]> SALOME platform Git repositories - tools/libbatch.git/blobdiff - src/Core/BatchManager.cxx
Salome HOME
Add rsync as a new protocol for copy.
[tools/libbatch.git] / src / Core / BatchManager.cxx
index 047b1ed20e3cdc120d00e1ed62d1d0a05ff46b63..5fdacf5f1ff2348c6294300dcdb5aed165ccebde 100644 (file)
@@ -256,17 +256,14 @@ namespace Batch {
       CoupleType cpt  = *static_cast< CoupleType * >(*Vit);
       Couple outputFile = cpt;
       string remotePath = outputFile.getRemote();
-      if (!Utils::isAbsolutePath(remotePath)) {
-        remotePath = params[WORKDIR].str() + "/" + remotePath;
+      if (!Utils::isAbsolutePath(remotePath) && !Utils::isOption(remotePath)) {
+        // rsync creates the whole tree after /./ in the destination folder
+        remotePath = params[WORKDIR].str() + "/./" + remotePath;
       }
       string localPath = outputFile.getLocal();
       if (!Utils::isAbsolutePath(localPath)) {
         localPath = directory + "/" + localPath;
       }
-      status = CommunicationProtocol::getInstance(SH).makeDirectory(
-                                             Utils::dirname(localPath), "", "");
-      if (status)
-        LOG("Directory creation failed. Status is: " << status);
       status = _protocol.copyFile(remotePath, _hostname, _username,
                                   localPath, "", "");
       if (status)