This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-4.18.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-4.18.x by this push:
new 3fca88435710 [backport camel-4.18.x] CAMEL-23834: camel-smb - Fix
forward slashes rejected on Windows during atomic rename (#24259)
3fca88435710 is described below
commit 3fca88435710e71e3e2638db58ceb470c974c1f2
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Jun 26 08:26:48 2026 +0200
[backport camel-4.18.x] CAMEL-23834: camel-smb - Fix forward slashes
rejected on Windows during atomic rename (#24259)
CAMEL-23834: camel-smb - Fix forward slashes rejected on Windows during
atomic rename (#24255)
Signed-off-by: Claus Ibsen <[email protected]>
Co-authored-by: Claude <[email protected]>
---
.../src/main/java/org/apache/camel/component/smb/SmbOperations.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/components/camel-smb/src/main/java/org/apache/camel/component/smb/SmbOperations.java
b/components/camel-smb/src/main/java/org/apache/camel/component/smb/SmbOperations.java
index e5a382c6ec26..981f76eaa770 100644
---
a/components/camel-smb/src/main/java/org/apache/camel/component/smb/SmbOperations.java
+++
b/components/camel-smb/src/main/java/org/apache/camel/component/smb/SmbOperations.java
@@ -225,7 +225,8 @@ public class SmbOperations implements SmbFileOperations {
public boolean atomicRenameFile(File src, String to)
throws GenericFileOperationFailedException {
try {
- src.rename(to);
+ // SMB protocol requires backslashes as path separators
+ src.rename(to.replace('/', '\\'));
LOG.debug("Renamed file: {} to: {} using atomic rename",
src.getUncPath(), to);
return true;
} catch (SMBRuntimeException e) {