Croway commented on code in PR #30680:
URL: https://github.com/apache/camel/pull/30680#discussion_r4677911224
##########
components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java:
##########
@@ -879,6 +884,14 @@ public void changeCurrentDirectory(String path) throws
GenericFileOperationFaile
}
}
+ /**
+ * Whether the path is the directory itself or one of its parent
directories. A path that only starts with the same
+ * characters, such as /home/cam for /home/camel, is not.
+ */
+ private static boolean isDirectoryOrParentOf(String path, String
directory) {
Review Comment:
Moved to `FtpUtils.isDirectoryOrParentOf` in 4ec38c20, with a unit test, and
the same on main and the other backport.
##########
components/camel-mina-sftp/src/main/java/org/apache/camel/component/file/remote/mina/MinaSftpOperations.java:
##########
@@ -1090,6 +1095,14 @@ public void changeCurrentDirectory(String path) throws
GenericFileOperationFaile
}
}
+ /**
+ * Whether the path is the directory itself or one of its parent
directories. A path that only starts with the same
+ * characters, such as /home/cam for /home/camel, is not.
+ */
+ private static boolean isDirectoryOrParentOf(String path, String
directory) {
Review Comment:
Moved to `FtpUtils.isDirectoryOrParentOf` in 4ec38c20, with a unit test, and
the same on main and the other backport.
--
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]