You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Michael Rambichler (Jira)" <ji...@apache.org> on 2026/06/25 16:31:00 UTC

[jira] [Created] (CAMEL-23834) camel-smb forward slashes rejected on Windows System STATUS_OBJECT_NAME_INVALID

Michael Rambichler created CAMEL-23834:
------------------------------------------

             Summary: camel-smb forward slashes rejected on Windows System STATUS_OBJECT_NAME_INVALID
                 Key: CAMEL-23834
                 URL: https://issues.apache.org/jira/browse/CAMEL-23834
             Project: Camel
          Issue Type: Bug
          Components: camel-smb
    Affects Versions: 4.18.0
            Reporter: Michael Rambichler


In Camel 4.14.x this works as expected.

In Camel 4.18+ (probably regression through CAMEL-22740)

When working directly with src.rename() against a rigid Windows Server, Windows may strictly rejects the name containing a forward slash with STATUS_OBJECT_NAME_INVALID (0xc0000033).

Failure:

 
{code:java}
Failed to rename file: \\WINDOWS-SERVER\test\test.xml to: test/inprocess/test.xml using atomic rename. Exchange[].Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - Failed to rename file: \\WINDOWS-SERVER\test\test.xml to: test/inprocess/test.xml using atomic rename]
  log.stack_trace  org.apache.camel.component.file.GenericFileOperationFailedException: Failed to rename file: \\WINDOWS-SERVER\test\test.xml to: test/inprocess/test.xml using atomic renameat org.apache.camel.component.smb.SmbOperations.atomicRenameFile(SmbOperations.java:232) {code}
 

 

This is the current code snippet (4.18.x)

 
{code:java}
public boolean atomicRenameFile(File src, String to)
        throws GenericFileOperationFailedException {
    try {
        src.rename(to);
        LOG.debug("Renamed file: {} to: {} using atomic rename", src.getUncPath(), to);
        return true;
    } catch (SMBRuntimeException e) {
        throw new GenericFileOperationFailedException(
                "Failed to rename file: " + src.getUncPath() + " to: " + to + " using atomic rename", e);
    }
} {code}
 

 

 

 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)