Croway commented on code in PR #30679:
URL: https://github.com/apache/camel/pull/30679#discussion_r4677910594
##########
components/camel-ftp-common/src/main/java/org/apache/camel/component/file/remote/RemoteFileProducer.java:
##########
@@ -53,6 +53,19 @@ public String normalizePath(String name) {
return name;
}
+ /**
+ * The operations replace a backslash in the name of the file they store
by / when the separator option is UNIX (the
+ * default). They use the name as given to check, delete or rename a file,
and to write a checksum file, so not when
+ * the producer writes a temp file, a done file or a checksum file.
+ */
+ @Override
+ protected boolean isBackslashNormalized() {
Review Comment:
Agreed, and it was more than the Javadoc: `ScpOperations.writeFile` sends
the name as given, with `/` as the only separator, so for scp the inherited
answer did not hold. On main, `ScpProducer` now overrides
`isBackslashNormalized()` to return `false`, so scp refuses a name with both
`\` and `..`, as the other producers do when they do not replace backslashes.
`ScpProducerBackslashNameTest` covers it, and the 4.24 upgrade note mentions
it. The backports keep scp as it is and only drop the scp sentence from the
Javadoc. (d04a1c1a)
--
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]