[ 
https://issues.apache.org/jira/browse/CAMEL-13667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16868593#comment-16868593
 ] 

Clemens Blamauer commented on CAMEL-13667:
------------------------------------------

I have created a pull request for camel-2.23.x branch:
[https://github.com/apache/camel/pull/2988]

Please let me know if you need anything else.

Thank you.

> Windows network UNC paths not treated correctly (File2/tempPrefix)
> ------------------------------------------------------------------
>
>                 Key: CAMEL-13667
>                 URL: https://issues.apache.org/jira/browse/CAMEL-13667
>             Project: Camel
>          Issue Type: Bug
>          Components: came-core
>    Affects Versions: 2.22.2
>            Reporter: Clemens Blamauer
>            Priority: Minor
>              Labels: UNC, camel-core, camel-file, windows
>             Fix For: 3.0.0, 2.23.4, 2.24.2, 2.25.0, 3.0.0.M4
>
>         Attachments: 
> Windows_network_UNC_paths_not_treated_correctly_(File2_tempPrefix).patch, 
> stacktrace.log
>
>
> Dear all,
> We are using Camel's File2 endpoint to deliver reports to a Windows network 
> share. The used URI is (here in a properties file):
> {{# File URI equivalent of \\FILESERVER.mycompany.local\Public\reports}}
>  
> {{report.delivery.to=[file:////FILESERVER.mycompany.local/Public/reports?keepLastModified=true&tempPrefix=tmp_]}}
> This results in an exception, see the stack trace (attached).
> I debugged and traced the issue back to:
> {{org.apache.camel.component.file.GenericFileProducer#createTempFileName}}
> which is using
> {{org.apache.camel.util.FileUtil#compactPath(java.lang.String, 
> java.lang.String)}}
> This method only preserves the first slash/backslash at the start. For UNC 
> paths on Windows however, 2 backslashes are needed.
> I prepared a patch for:
>  * {{org.apache.camel.util.FileUtil}}
>  * {{org.apache.camel.util.FileUtilTest}}
> which remedies the issue on Windows.
> I would appreciate if you could check the patch, and integrate it to 2.x and 
> 3.x branches if it is ok.
> Thank you.
> Kind regards,
> Clemens
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to