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/05 04:24:34 UTC
camel git commit: CAMEL-11811 - add a new simple option in case some
FTP servers fails creating dir with trailing slash
Repository: camel
Updated Branches:
refs/heads/master a558f54ec -> 0ced4e92e
CAMEL-11811 - add a new simple option in case some FTP servers fails creating dir with trailing slash
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0ced4e92
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0ced4e92
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0ced4e92
Branch: refs/heads/master
Commit: 0ced4e92ec776bc5438c362a2a70c2f67f38a3ab
Parents: a558f54
Author: onders86 <on...@gmail.com>
Authored: Wed Oct 4 02:08:13 2017 +0300
Committer: onders86 <on...@gmail.com>
Committed: Thu Oct 5 07:24:16 2017 +0300
----------------------------------------------------------------------
.../org/apache/camel/component/file/remote/FtpOperations.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/0ced4e92/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
index 4a96d94..6a8ecc7 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
@@ -869,7 +869,11 @@ public class FtpOperations implements RemoteFileOperations<FTPFile> {
// do not try to build root folder (/ or \)
if (!(directory.equals("/") || directory.equals("\\"))) {
log.trace("Trying to build remote directory by chunk: {}", directory);
-
+
+ // while creating directory string if directory results in
+ // trailing slash, remove it not necessary
+ directory = FileUtil.stripTrailingSeparator(directory);
+
success = client.makeDirectory(directory);
}
}