[
https://issues.apache.org/jira/browse/CAMEL-23834?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen reassigned CAMEL-23834:
-----------------------------------
Assignee: Claus Ibsen
> 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
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.14.8, 4.18.3, 4.21.0
>
>
> 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)