Salome HOME
Added constants to represent job status uniformly. Fixed some errors under Windows...
[tools/libbatch.git] / src / Core / Batch_CommunicationProtocol.cxx
index 530a5f3765495e98246f67c089a82dd2eb4340f1..1d70b576503e04edaa3c6d1ec3b2abc83fba014f 100644 (file)
@@ -127,9 +127,14 @@ namespace Batch {
     for (unsigned int i=0 ; i<commandArgs.size() ; i++) {
       if (i != 0) commandStr += " ";
 
-      // if the argument contains spaces, we surround it with quotes
+      // if the argument contains spaces, we surround it with simple quotes (Linux)
+      // or double quotes (Windows)
       if (commandArgs[i].find(' ') != string::npos) {
+#ifdef WIN32
+        commandStr += string("\"") + commandArgs[i] + "\"";
+#else
         commandStr += string("\'") + commandArgs[i] + "\'";
+#endif
       } else {
         commandStr += commandArgs[i];
       }