#4927 Blind attempt at improving reliability of smspec import

This commit is contained in:
Gaute Lindkvist
2019-11-07 15:59:37 +01:00
parent dc2af5e0c8
commit 285433cbb8
2 changed files with 18 additions and 2 deletions

View File

@@ -173,6 +173,8 @@ std::vector<RifRestartFileInfo> RifReaderEclipseSummary::getRestartFiles( const
m_warnings.clear();
*hasWarnings = false;
std::set<QString> restartFilesOpened;
RifRestartFileInfo currFile;
currFile.fileName = headerFileName;
while ( !currFile.fileName.isEmpty() )
@@ -216,6 +218,12 @@ std::vector<RifRestartFileInfo> RifReaderEclipseSummary::getRestartFiles( const
*hasWarnings = true;
break;
}
else if ( restartFilesOpened.count( currFile.fileName ) != 0u )
{
m_warnings.push_back( "RifReaderEclipseSummary: Same restart file being opened multiple times" );
*hasWarnings = true;
}
restartFilesOpened.insert( currFile.fileName );
}
if ( !currFile.fileName.isEmpty() ) restartFiles.push_back( currFile );