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
This results in an exception, see the stack trace (attached).
I debugged and traced the issue back to:
which is using
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:
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.