From: eap Date: Thu, 8 Nov 2012 10:58:02 +0000 (+0000) Subject: 0051571: TC6.6.0: "Export to MED file" doesn't export file to folder,that has space... X-Git-Tag: V6_6_0b1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9421b914c0414ee21627f859d2c56eb7149cb107;p=modules%2Fvisu.git 0051571: TC6.6.0: "Export to MED file" doesn't export file to folder,that has space in the name. set quotes around file names within system commands --- diff --git a/src/VISU_I/VISU_Result_i.cc b/src/VISU_I/VISU_Result_i.cc index 41e5347e..4ef802f8 100644 --- a/src/VISU_I/VISU_Result_i.cc +++ b/src/VISU_I/VISU_Result_i.cc @@ -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 );