From: barate Date: Mon, 19 Nov 2012 15:02:37 +0000 (+0000) Subject: If the local path for an output file is relative, consider it relative to the results... X-Git-Tag: V1_6_0rc1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8ee567837a6f970d8cb0f393dd53d92a9369e316;p=tools%2Flibbatch.git If the local path for an output file is relative, consider it relative to the results directory --- diff --git a/src/Core/Batch_BatchManager_eClient.cxx b/src/Core/Batch_BatchManager_eClient.cxx index 0895672..92162b2 100644 --- a/src/Core/Batch_BatchManager_eClient.cxx +++ b/src/Core/Batch_BatchManager_eClient.cxx @@ -49,6 +49,7 @@ #include "Batch_Constants.hxx" #include "Batch_BatchManager_eClient.hxx" #include "Batch_RunTimeException.hxx" +#include "Batch_Utils.hxx" #ifdef MSVC #define EXISTS(path) _access_s(path, 0) == 0 @@ -166,8 +167,12 @@ namespace Batch { for(Vit=V.begin(); Vit!=V.end(); Vit++) { CoupleType cpt = *static_cast< CoupleType * >(*Vit); Couple outputFile = cpt; + string localPath = outputFile.getLocal(); + if (!Utils::isAbsolutePath(localPath)) { + localPath = directory + "/" + localPath; + } status = _protocol.copyFile(outputFile.getRemote(), _hostname, _username, - outputFile.getLocal(), "", ""); + localPath, "", ""); if (status) { // Try to get what we can (logs files) // throw BatchException("Error of connection on remote host");