r1820 - isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/launcher
Author: chatellier Date: 2009-02-17 14:34:38 +0000 (Tue, 17 Feb 2009) New Revision: 1820 Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/launcher/SSHSimulatorLauncher.java Log: Fix not ended by / tmp path Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/launcher/SSHSimulatorLauncher.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/launcher/SSHSimulatorLauncher.java 2009-02-17 11:43:37 UTC (rev 1819) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/simulator/launcher/SSHSimulatorLauncher.java 2009-02-17 14:34:38 UTC (rev 1820) @@ -434,6 +434,7 @@ // first check that remote directory exists String remotePath = IsisFish.config.getSimulatorSshTmpPath(); + String command = "if [ ! -d \"" + remotePath + "\" ] ; then mkdir \"" + remotePath + "\"; fi"; if (log.isInfoEnabled()) { @@ -450,7 +451,10 @@ } // upload directory in that dir - + if (!remotePath.endsWith("/")) { + remotePath += "/"; + } + if (localPath.lastIndexOf("/") > 0) { remotePath += localPath.substring(localPath.lastIndexOf("/") + 1); } else if (localPath.lastIndexOf("\\") > 0) { // windows @@ -543,6 +547,11 @@ // remote temp directory should have been created // by #downloadResults(Session, String) + // upload directory in that dir + if (!remotePath.endsWith("/")) { + remotePath += "/"; + } + if (localPath.lastIndexOf("/") > 0) { remotePath += localPath.substring(localPath.lastIndexOf("/") + 1); } else if (localPath.lastIndexOf("\\") > 0) { // windows
participants (1)
-
chatellierï¼ users.labs.libre-entreprise.org