#14761 Find summary data files when file name contains multiple dots

QFileInfo::baseName() truncates at the first dot, so the ESMRY and h5 files were not found for realizations like CASE.V2-0.SMSPEC. Without an UNSMRY file the realization was opened as an empty summary case. Use completeBaseName() to strip only the extension.
This commit is contained in:
Magne Sjaastad committed 2026-09-16 05:06:47 -04:00
1 parent 3414fee046
commit cfb9e5765e
4 files changed
+55 -4

No files matched your search

@@ -557,7 +557,7 @@ void RimSummaryCaseMainCollection::loadFileSummaryCaseData( const std::vector<Ri
QFileInfo fi( headerFileName );
// NB! Use canonicalPath to make sure any symlinks are resolved to absolute file paths
QString h5FilenameCandidate = fi.canonicalPath() + "/" + fi.baseName() + ".h5";
QString h5FilenameCandidate = fi.canonicalPath() + "/" + fi.completeBaseName() + ".h5";
headerFileNames.push_back( headerFileName.toStdString() );
h5FileNames.push_back( h5FilenameCandidate.toStdString() );