mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7633 Summary Reader : Resolve symlinks for h5 file management
This commit is contained in:
parent
1cf1eef048
commit
536e656684
@ -364,9 +364,6 @@ ecl_sum_type* RifEclipseSummaryTools::openEclSum( const QString& inHeaderFileNam
|
|||||||
|
|
||||||
if ( headerFileName.isEmpty() || dataFileNames.isEmpty() ) return nullptr;
|
if ( headerFileName.isEmpty() || dataFileNames.isEmpty() ) return nullptr;
|
||||||
|
|
||||||
assert( !headerFileName.isEmpty() );
|
|
||||||
assert( dataFileNames.size() > 0 );
|
|
||||||
|
|
||||||
stringlist_type* dataFiles = stringlist_alloc_new();
|
stringlist_type* dataFiles = stringlist_alloc_new();
|
||||||
for ( int i = 0; i < dataFileNames.size(); i++ )
|
for ( int i = 0; i < dataFileNames.size(); i++ )
|
||||||
{
|
{
|
||||||
|
@ -465,7 +465,9 @@ void RimSummaryCaseMainCollection::loadFileSummaryCaseData( std::vector<RimFileS
|
|||||||
auto headerFileName = fileSummaryCase->summaryHeaderFilename();
|
auto headerFileName = fileSummaryCase->summaryHeaderFilename();
|
||||||
|
|
||||||
QFileInfo fi( headerFileName );
|
QFileInfo fi( headerFileName );
|
||||||
QString h5FilenameCandidate = fi.absolutePath() + "/" + fi.baseName() + ".h5";
|
|
||||||
|
// NB! Use canonicalPath to make sure any symlinks are resolved to absolute file paths
|
||||||
|
QString h5FilenameCandidate = fi.canonicalPath() + "/" + fi.baseName() + ".h5";
|
||||||
|
|
||||||
headerFileNames.push_back( headerFileName.toStdString() );
|
headerFileNames.push_back( headerFileName.toStdString() );
|
||||||
h5FileNames.push_back( h5FilenameCandidate.toStdString() );
|
h5FileNames.push_back( h5FilenameCandidate.toStdString() );
|
||||||
|
Loading…
Reference in New Issue
Block a user