This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new af92ea489e60 CAMEL-23834: camel-smb - Fix forward slashes rejected on
Windows during atomic rename (#24255)
af92ea489e60 is described below
commit af92ea489e60ca84b888bd5f661e88b4e1b687ac
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Jun 26 07:38:31 2026 +0200
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 cfcbe15b023b..b0c302133952 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
@@ -237,7 +237,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) {