This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch fix/CAMEL-23834 in repository https://gitbox.apache.org/repos/asf/camel.git
commit 2ac7bfccb27a44d197ceb700f48d217de6270e3f Author: Claus Ibsen <[email protected]> AuthorDate: Thu Jun 25 20:49:46 2026 +0200 CAMEL-23834: camel-smb - Fix forward slashes rejected on Windows during atomic rename Co-Authored-By: Claude <[email protected]> Signed-off-by: Claus Ibsen <[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) {
