#10002 Do not replace '.' with the current project path

When starting resinsight from a working folder, the project file paths can be relative to this folder (current working folder). If files are referenced relative to current working folder, the file references can start with either '..' or '.'  Make sure that these paths are left unchanged.
This commit is contained in:
Magne Sjaastad 2023-03-23 11:13:13 +01:00
parent 6529b1760d
commit b21c7028c2

View File

@ -483,11 +483,6 @@ void RimProject::setProjectFileNameAndUpdateDependencies( const QString& project
std::vector<QString> searchedPaths;
QString filePathCandidate = filePath->path();
if ( filePathCandidate.startsWith( '.' ) )
{
filePathCandidate = filePathCandidate.right( filePathCandidate.size() - 1 );
filePathCandidate = newProjectPath + filePathCandidate;
}
QString newFilePath = RimTools::relocateFile( filePathCandidate, newProjectPath, oldProjectPath, &foundFile, &searchedPaths );
filePath->setPath( newFilePath );