Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-11912

Camel file's tempPrefix does not work correctly if the target is Windows UNC path

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • fuse-7.6-DR1
    • fuse-7.4-GA
    • Camel
    • None

      If windows UNC path is used in the file producer, it does not take the actual path which starts with double backward slash "\ \" when creating the temp file. Instead, it only takes one "\" and creates a file relative to the local directory

      <from uri="file://xyz/inbox/" />
      <to uri="file:////system/test/outbox?tempPrefix=incomplete_" />
      

      This creates the temporary file in C:/system/test/outbox/dynamicDirectory/ but it should have been created in \\system\test\outbox\dynamicDirectory

      The following exception is received while doing so:

      Stacktrace --------------------------------------------------------------------------------------------------------------------------------------- 
      org.apache.camel.component.file.GenericFileOperationFailedException: Error renaming file from 
      \system\Anonymous\Test\outbox\dynamicDirectory\incomplete_README.md to 
      \\system\Anonymous\Test\outbox\dynamicDirectory\README.md
      at org.apache.camel.component.file.FileOperations.renameFile(FileOperations.java:81) 
      at org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:202) 
      at org.apache.camel.component.file.GenericFileProducer.process(GenericFileProducer.java:80) 
      ..............................
      ...........................
      at java.lang.Thread.run(Thread.java:748) Caused by: java.nio.file.NoSuchFileException: 
      \system\Anonymous\Test\outbox\dynamicDirectory\incomplete_README.md -> 
      \\system\Anonymous\Test\outbox\dynamicDirectory\README.md 
      

      This was already fixed in the upstream Camel CAMEL-13667

            johnpoth John Poth
            rhn-support-adongre Avinash Dongre
            Francesco Mongiardo Francesco Mongiardo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: