]> SALOME platform Git repositories - tools/libbatch.git/commitdiff
Salome HOME
Fix for the "21727: [CEA 584] sending a Yacs graph from Windows to a cluster " issue.
authorrnv <rnv@opencascade.com>
Tue, 31 Jul 2012 08:06:34 +0000 (08:06 +0000)
committerrnv <rnv@opencascade.com>
Tue, 31 Jul 2012 08:06:34 +0000 (08:06 +0000)
src/Core/Batch_BatchManager_eClient.cxx

index 2098e724f64e3cd470ee8b2d2bf8bbc516a2bfa1..30a528d39114cfea1a5e29bb46387c24b8a1da9c 100644 (file)
@@ -111,8 +111,11 @@ namespace Batch {
 #ifdef WIN32
       // On Windows, we make the remote file executable afterward because
       // pscp does not preserve access permissions on files
-      string subCommand = string("chmod u+x ") + string(params[TMPDIR]) + "/" +
-                          string(params[EXECUTABLE]);
+
+         string executable = string(params[EXECUTABLE]);
+         executable = executable.substr(executable.rfind("/") + 1,executable.length());
+
+      string subCommand = string("chmod u+x ") + string(params[TMPDIR]) + "/" + executable;
       string command = _protocol.getExecCommand(subCommand, _hostname, _username);
       cerr << command.c_str() << endl;
       status = system(command.c_str());