From: asl Date: Thu, 24 Nov 2016 12:47:48 +0000 (+0300) Subject: patch for export Telemac in current/home folder X-Git-Tag: v1.6~26 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ef9175879a75d5eaa5e2e5d39f441cf8c1687c15;p=modules%2Fhydro.git patch for export Telemac in current/home folder --- diff --git a/src/HYDROData/HYDROData_LandCoverMap.cxx b/src/HYDROData/HYDROData_LandCoverMap.cxx index c9788e20..046e61fd 100644 --- a/src/HYDROData/HYDROData_LandCoverMap.cxx +++ b/src/HYDROData/HYDROData_LandCoverMap.cxx @@ -421,15 +421,18 @@ bool HYDROData_LandCoverMap::ExportTelemac( const QString& theFileName, QFile aFile( theFileName ); if( !aFile.open( QFile::WriteOnly | QFile::Text ) ) { - QString homeDirPath = QDir::homePath(); - aFile.setFileName(homeDirPath); + QString homeFilePath = QDir::home().absoluteFilePath( theFileName ); + aFile.setFileName(homeFilePath); if (aFile.open( QFile::WriteOnly | QFile::Text ) ) - statMessage = "Telemac file have been exported to the home directory:" + homeDirPath; + statMessage = "Telemac file have been exported to the home directory: " + homeFilePath; else return false; } else - statMessage = "Telemac file have been exported to the current directory"; + { + QString absFilePath = QDir::current().absoluteFilePath( theFileName ); + statMessage = "Telemac file have been exported to the current directory: " + absFilePath; + } QTextStream aStream( &aFile ); aStream << "# nodes\n";