You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/09/05 07:25:00 UTC

[jira] [Work logged] (CAMEL-13931) camel-file - tempFileName directory is not auto-created if it is relative before the endpoint path

     [ https://issues.apache.org/jira/browse/CAMEL-13931?focusedWorklogId=306961&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-306961 ]

ASF GitHub Bot logged work on CAMEL-13931:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Sep/19 07:24
            Start Date: 05/Sep/19 07:24
    Worklog Time Spent: 10m 
      Work Description: davsclaus commented on pull request #3144: CAMEL-13931 tempFileName directory is not auto-created...
URL: https://github.com/apache/camel/pull/3144
 
 
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 306961)
    Time Spent: 40m  (was: 0.5h)

> camel-file - tempFileName directory is not auto-created if it is relative before the endpoint path
> --------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-13931
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13931
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.23.3, 2.22.5, 2.24.1, 3.0.0.M4
>            Reporter: Dimitri Kotlovsky
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 3.0.0, 2.23.4, 2.24.2, 2.25.0, 3.0.0.RC2
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Hi,
> I face a requirement to place temp files in a folder at the same hierarchy as the output folder like this:
>  * {{target/data/output/claus.txt}}
>  * {{target/data/temp/claus.tmp}}
> Using a simple route definition like:
> {code:java}
> from("direct:a").to("file://target/data/output/?tempFileName=../temp/${file:name.noext}.tmp"){code}
>  
> If the temp folder does not exist, the GenericFileProducer should auto-create it. However, it only does so correctly for the tempFileName path, if it is *relativ "after" the endpoint path*. If it is above/before the endpoint path the tempFileName path will be created as a child of the endpoint path instead:
>  * {{target/data/output/target/data/temp}}
> This results in a NoSuchFileException when camel tries to write the temp file into the "correct" temp directory target/data/temp afterwards.
>  
>  
> A very easy way to reproduce this is to use the 'parentFileUrl' instead of the 'fileUrl' in the createRouteBuilder method of FileProduceTempFileNameTest.java ([https://github.com/apache/camel/blob/master/core/camel-core/src/test/java/org/apache/camel/component/file/FileProduceTempFileNameTest.java]).



--
This message was sent by Atlassian Jira
(v8.3.2#803003)