From fa184cef5638c6ea70fc355097c957176edfbc91 Mon Sep 17 00:00:00 2001 From: rnv Date: Tue, 31 Jul 2012 08:06:34 +0000 Subject: [PATCH] Fix for the "21727: [CEA 584] sending a Yacs graph from Windows to a cluster " issue. --- src/Core/Batch_BatchManager_eClient.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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()); -- 2.39.2