From 8ee567837a6f970d8cb0f393dd53d92a9369e316 Mon Sep 17 00:00:00 2001 From: barate Date: Mon, 19 Nov 2012 15:02:37 +0000 Subject: [PATCH] If the local path for an output file is relative, consider it relative to the results directory --- src/Core/Batch_BatchManager_eClient.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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"); -- 2.39.2