allthingssecurity commented on PR #28589:
URL: https://github.com/apache/camel/pull/28589#issuecomment-6464290931
@davsclaus thanks, all points are in 2ea57f523a7a (one new commit on top).
**Blocker (prefix check).** Reproduced first: with `stepwise=false`,
`${file:name}.bak` of `movement.txt` in `move` went to the login directory. The
ftp, sftp/mina-sftp and smb strategies now use a new
`MoveExistingFileStrategyUtils.completeRelativePathInDirectory`, which leaves a
relative result alone only when it starts with the directory as whole path
segments (`/` or `\`). I kept `completePartialRelativePath` as it is for
camel-file. There `${file:name}` is still the full path, so the bug can't
happen, and a segment check would move `${file:parent}-old/${file:onlyname}`
from next to the directory into it for a relative file endpoint. For the remote
components, that move is now the trade-off: `${file:parent}-old/...` or
`move-old/...` goes below the directory. The guide says so and gives
`../move-old/${file:onlyname}` as the way to get a directory next to it. smb
resolves the `..` itself, because SMB servers reject it.
**Non-blocking**
1. camel-smb is included: `${file:name}` is the name in the directory, as
for ftp/sftp. The guide heading names it.
2. The code comments now mention `tempFileName`. The `${file:parent}`
control test (`stepwise=false`) is in the FTP and SFTP ITs.
3. Right, the PR doesn't make the remote side consistent with camel-file. It
makes it behave like `stepwise=true`. The guide and the description now say
that, and say that camel-file is unchanged.
4. Backticks added to the heading.
**Tests.** New unit tests for the helper and for the sftp, mina-sftp and smb
strategies. The smb test uses a proxy for the operations, because the smb ITs
need a Samba container. New FTP IT cases: `movement.txt` with and without
`tempFileName`, and `../move-old` (also in the sftp and mina-sftp ITs). On the
PR head, the FTP IT fails 3 runs, the sftp and mina strategy tests fail 3 of 7
each, and the smb test fails 4 of 7. With the fix: camel-ftp 228 run / 0
failures, camel-mina-sftp 77 / 0, camel-file 34 / 0, and the camel-core file
tests 475 / 0. The same results hold on a local merge with current main. I
updated the description to match.
_Claude Code on behalf of allthingssecurity_
--
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]