Hi,
I have a problem with the (S)FTP component in combination with a Windows based FTP server, which means the file names are case insensitive.

Camel 2.24.0.

My route:
  from("file:xxx?include=(?i)test.txt")
   .to("sftp://myhost?fileExist=Fail";)

On the target server there ist already a file named TEST.TXT (upper case!)

With a Linux based filessystem on the FTP server this works, it would not fail and afterwards there are two files named text.txt and TEST.TXT on the server.

But on a Windows server, the case sensitive filename matching (SftpOperations.java#existsFile) does not recognize the already existent file with the different case, therefore it does not fail and the file would be overwritten! In this use case the "fileExist=Fail" does not work at all.

I am aware of that we are on the client side and do not know anything about the underlying file system of the FTP server, and it would be difficult to detect such an environment, but in my opinion this is a bug. Perhaps there has to be another endpoint option how to exactly match the file names.

But for a quick solution: Anyone an idea of a workaround (preferably without having to write a custom component/endpoint)?


Thanks in advance
  Volker

Reply via email to