Salome HOME
patch for install error on Linux
[modules/hydro.git] / src / HYDROData / HYDROData_LandCoverMap.cxx
index c9788e204acafce3ed71e35c1a2a7e997280dcb7..046e61fd8126f4142eae4f4e3d7e5cf1d3ac81a0 100644 (file)
@@ -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";