[
https://issues.apache.org/jira/browse/CAMEL-26644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-26644.
---------------------------------
Resolution: Fixed
Fixed on main in https://github.com/apache/camel/pull/29250 and backported to
camel-4.22.x in https://github.com/apache/camel/pull/29302
_Claude Code on behalf of davsclaus_
> 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
> Assignee: Salvatore Mongiardo
> Priority: Major
> Fix For: 4.22.3, 4.24.0
>
>
> 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)