You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by on...@apache.org on 2017/10/27 15:57:34 UTC

[camel] branch master updated: CAMEL-11387 - adjust destination filename by calling existing method to make it compact as jcraft seems to need it

This is an automated email from the ASF dual-hosted git repository.

onders pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 530e71e  CAMEL-11387 - adjust destination filename by calling existing method to make it compact as jcraft seems to need it
530e71e is described below

commit 530e71e7f5decaca919fe49011c79152ad7e3560
Author: onders86 <on...@gmail.com>
AuthorDate: Fri Oct 27 14:46:08 2017 +0300

    CAMEL-11387 - adjust destination filename by calling existing method to make it compact as jcraft seems to need it
---
 .../java/org/apache/camel/component/file/remote/SftpOperations.java    | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
index 1721c40..84d427f 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
@@ -447,6 +447,9 @@ public class SftpOperations implements RemoteFileOperations<ChannelSftp.LsEntry>
         LOG.debug("Renaming file: {} to: {}", from, to);
         try {
             reconnectIfNecessary();
+            //make use of the '/' separator because JSch expects this 
+            // as the file separator even on Windows
+            to = FileUtil.compactPath(to, '/');
             channel.rename(from, to);
             return true;
         } catch (SftpException e) {

-- 
To stop receiving notification emails like this one, please contact
['"commits@camel.apache.org" <co...@camel.apache.org>'].