From: rnv Date: Tue, 31 Jul 2012 08:06:34 +0000 (+0000) Subject: Fix for the "21727: [CEA 584] sending a Yacs graph from Windows to a cluster " issue. X-Git-Tag: V1_6_0a1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fa184cef5638c6ea70fc355097c957176edfbc91;p=tools%2Flibbatch.git Fix for the "21727: [CEA 584] sending a Yacs graph from Windows to a cluster " issue. --- diff --git a/src/Core/Batch_BatchManager_eClient.cxx b/src/Core/Batch_BatchManager_eClient.cxx index 2098e72..30a528d 100644 --- a/src/Core/Batch_BatchManager_eClient.cxx +++ b/src/Core/Batch_BatchManager_eClient.cxx @@ -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());