From ef9175879a75d5eaa5e2e5d39f441cf8c1687c15 Mon Sep 17 00:00:00 2001 From: asl Date: Thu, 24 Nov 2016 15:47:48 +0300 Subject: [PATCH] patch for export Telemac in current/home folder --- src/HYDROData/HYDROData_LandCoverMap.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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"; -- 2.39.2