allthingssecurity commented on code in PR #28589:
URL: https://github.com/apache/camel/pull/28589#discussion_r4398389782


##########
components/camel-ftp-common/src/main/java/org/apache/camel/component/file/remote/SftpDefaultMoveExistingFileStrategy.java:
##########
@@ -48,7 +48,11 @@ public boolean moveExistingFile(GenericFileEndpoint<?> 
endpoint, GenericFileOper
         //any leading separator
         String parent = 
FileUtil.stripLeadingSeparator(FileUtil.onlyPath(fileName));
         String onlyName = FileUtil.stripPath(fileName);
-        dummy.getIn().setHeader(FtpConstants.FILE_NAME, fileName);
+        // the file name is the name in the directory of the file, as when the 
producer has changed into that
+        // directory (stepwise=true); a relative result is completed with that 
directory below. Without stepwise
+        // (and in mina-sftp) the given name has the path from the login 
directory, and with it ${file:name} would

Review Comment:
   Applied in 2ea57f523a7a: the comment now names the tempFileName case, as in 
the upgrade guide.



##########
components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpDefaultMoveExistingFileStrategy.java:
##########
@@ -51,7 +51,11 @@ public boolean moveExistingFile(GenericFileEndpoint<?> 
endpoint, GenericFileOper
         //any leading separator
         String parent = 
FileUtil.stripLeadingSeparator(FileUtil.onlyPath(fileName));
         String onlyName = FileUtil.stripPath(fileName);
-        dummy.getIn().setHeader(FtpConstants.FILE_NAME, fileName);
+        // the file name is the name in the directory of the file, as when the 
producer has changed into that
+        // directory (stepwise=true); a relative result is completed with that 
directory below. Without stepwise
+        // (and in mina-sftp) the given name has the path from the login 
directory, and with it ${file:name} would

Review Comment:
   Applied in 2ea57f523a7a: the comment now names the tempFileName case, as in 
the upgrade guide.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to