]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
0051571: TC6.6.0: "Export to MED file" doesn't export file to folder,that has space... V6_6_0b1 V6_6_BR_OCCdev_351bbcba7e V6_6_BR_OCCdev_deb26df7c0 before_mergefrom_V6_main_12Nov12 mergefrom_V6_main_12Nov12
authoreap <eap@opencascade.com>
Thu, 8 Nov 2012 10:58:02 +0000 (10:58 +0000)
committereap <eap@opencascade.com>
Thu, 8 Nov 2012 10:58:02 +0000 (10:58 +0000)
   set quotes around file names within system commands

src/VISU_I/VISU_Result_i.cc

index 41e5347ef967f02458dfa6a28efde34a97654d29..4ef802f8feae0776132df1f738b198f4b077715d 100644 (file)
@@ -752,7 +752,7 @@ VISU::Result_i
 
   static QString aCommand;
   std::string aFilePath =  theTmpDir + aFileName;
-  aCommand.sprintf(" %s %s", GetFileInfo().filePath().toLatin1().data(), aFilePath.c_str());
+  aCommand.sprintf(" \"%s\" \"%s\"", GetFileInfo().filePath().toLatin1().data(), aFilePath.c_str());
   aCommand = QDir::convertSeparators( aCommand );
   aCommand.prepend( COPY_COMMAND );
 
@@ -859,7 +859,7 @@ VISU::Result_i
         
         if (theIsMultiFile) { // set this file as new - temporary
           static QString aCommand;
-          aCommand.sprintf(" %s %s%s",aHDFFileName, aResultPath, myFileInfo.baseName().toLatin1().data());
+          aCommand.sprintf(" \"%s\" \"%s%s\"",aHDFFileName, aResultPath, myFileInfo.baseName().toLatin1().data());
           aCommand = QDir::convertSeparators( aCommand );
           aCommand.prepend( MOVE_COMMAND );
         
@@ -872,7 +872,7 @@ VISU::Result_i
           myFileInfo.setFile(QString(aResultPath) + myFileInfo.baseName());
         } else { // change current temporary file to the new: with hdf-format
           static QString aCommand;
-          aCommand.sprintf(" %s %s\0",aHDFFileName, myFileInfo.filePath().toLatin1().data());
+          aCommand.sprintf(" \"%s\" \"%s\"\0",aHDFFileName, myFileInfo.filePath().toLatin1().data());
           aCommand = QDir::convertSeparators( aCommand );
           aCommand.prepend( MOVE_COMMAND );
         
@@ -1449,7 +1449,7 @@ VISU::Result_i
 {
   static QString aCommand;
   const char* aTempFileName = myFileInfo.absoluteFilePath().toLatin1();
-  aCommand.sprintf(" %s %s", aTempFileName, theTargetFileName);
+  aCommand.sprintf(" \"%s\" \"%s\"", aTempFileName, theTargetFileName);
   aCommand = QDir::convertSeparators( aCommand );
   aCommand.prepend( COPY_COMMAND );