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 2018/10/02 13:39:18 UTC
[camel] branch master updated: CAMEL-12848 - handle differently on
windows for fa
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 0d36126 CAMEL-12848 - handle differently on windows for fa
0d36126 is described below
commit 0d3612672f2927d0428c2b79686759c16be88791
Author: önder sezgin <on...@apache.org>
AuthorDate: Tue Oct 2 12:22:17 2018 +0300
CAMEL-12848 - handle differently on windows for fa
iling test case
---
.../org/apache/camel/component/file/remote/SftpOperations.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
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 1db1c84..b912151 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
@@ -605,8 +605,13 @@ public class SftpOperations implements RemoteFileOperations<SftpRemoteFile> {
// if it starts with the root path then a little special handling for that
if (FileUtil.hasLeadingSeparator(path)) {
// change to root path
- doChangeDirectory(path.substring(0, 1));
- path = path.substring(1);
+ if (!FileUtil.isWindows()) {
+ doChangeDirectory(path.substring(0, 1));
+ path = path.substring(1);
+ } else {
+ doChangeDirectory(path.substring(0, 4));
+ path = path.substring(4);
+ }
}
// split into multiple dirs