Salvatore Mongiardo created CAMEL-26644:
-------------------------------------------

             Summary: camel-file: getFile() and getDirectory() return 
inconsistent path separators on Linux/macOS
                 Key: CAMEL-26644
                 URL: https://issues.apache.org/jira/browse/CAMEL-26644
             Project: Camel
          Issue Type: Improvement
            Reporter: Salvatore Mongiardo


On Linux/macOS, when a backslash appears in the file: URI path (e.g. 
file:target\subdir), getFile().getPath() preserves the backslash while 
getConfiguration().getDirectory() normalizes it to /. This inconsistency can 
cause the producer to create a spurious backslash-named directory and the 
consumer to miss files.

Fix: apply FileUtil.normalizePath(remaining) in 
FileComponent.buildFileEndpoint() so both getFile() and getDirectory() follow 
the same per-OS normalization rule. On Windows this has no effect since 
java.io.File already normalizes both separators.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to