camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Michel Morel (JIRA)" <j...@apache.org>
Subject [jira] Created: (CAMEL-3617) Inconsistent filename value when move attribute is used with File component
Date Thu, 03 Feb 2011 14:01:29 GMT
Inconsistent filename value when move attribute is used with File component
---------------------------------------------------------------------------

                 Key: CAMEL-3617
                 URL: https://issues.apache.org/jira/browse/CAMEL-3617
             Project: Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.5.0
         Environment: Windows Vista
            Reporter: Jean-Michel Morel


Unless I miss a point, when I use the following endpoint, the file:name value is incorrect
and is equal to file:absolute.path

<endpoint id="fileEndpoint" uri="file:${queue.input.folder}?recursive=true&amp;include=.*\.dat&amp;move=${queue.done.folder}/$simple{file:name}&amp;moveFailed=${queue.failed.folder}/$simple{file:name}"
/>

${queue.input.folder}, ${queue.done.folder} and ${queue.failed.folder} are absolute paths
resolved by Spring.

In fact, Camel tries to move the file to ${queue.done.folder}/${queue.input.folder}/$simple{file:name}
I've also tried using $simple{header.CamelFileName} instead of $simple{file:name} and it gives
the same result.

For now, I've found a workaround using a processor which put the CamelFileName header value
into a "destFile" property 
<endpoint id="fileEndpoint" uri="file:${queue.input.folder}?recursive=true&amp;include=.*\.dat&amp;move=${queue.done.folder}/$simple{property.destFile}&amp;moveFailed=${queue.failed.folder}/$simple{property.destFile}"
/>


-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message