From fc51bf84a523549f49f463e584d6a80c95548f4e Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Tue, 30 May 2023 14:09:00 +0200 Subject: [PATCH] Make sure one case is loaded when both SMSPEC and ESMRY is present in same folder --- ApplicationLibCode/Application/RiaEclipseFileNameTools.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ApplicationLibCode/Application/RiaEclipseFileNameTools.cpp b/ApplicationLibCode/Application/RiaEclipseFileNameTools.cpp index 5e7a11869c..cf3efd6918 100644 --- a/ApplicationLibCode/Application/RiaEclipseFileNameTools.cpp +++ b/ApplicationLibCode/Application/RiaEclipseFileNameTools.cpp @@ -70,6 +70,12 @@ std::vector RiaEclipseFileNameTools::findSummaryFileCandidates() auto smryCandidate = relatedFilePath( EclipseFileType::ECLIPSE_SMSPEC ); auto esmryCandidate = relatedFilePath( EclipseFileType::ECLIPSE_ESMRY ); + if ( !smryCandidate.isEmpty() && !esmryCandidate.isEmpty() ) + { + // If both files exist, we prefer the SMSPEC file + esmryCandidate = ""; + } + return { smryCandidate, esmryCandidate }; }