camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bengt Rodehav (JIRA)" <>
Subject [jira] [Commented] (CAMEL-6309) Sftp upload to subdirectory does not work if home directory is root ("/" or "\")
Date Thu, 25 Apr 2013 07:34:16 GMT


Bengt Rodehav commented on CAMEL-6309:

Uploaded patches for extending the FileUtilTest as well as fixing the problem in FileUtil.
In FileUtilTest i added four more asserts in testCompactPath(). All of those failed for me
before applying the fix. Note that I added the four asserts both for the "Windows" case and
the "non-Windows" case but I have only tested on Windows.
> Sftp upload to subdirectory does not work if home directory is root ("/" or "\")
> --------------------------------------------------------------------------------
>                 Key: CAMEL-6309
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.10.2, 2.10.3, 2.10.4, 2.11.0
>            Reporter: Bengt Rodehav
>            Priority: Critical
>         Attachments:,
> It is not possible to upload a file to a sub directory via sftp if the home directory
(the directory where you end up directly after login) is root ("/" or "\").
> The reason is that after having checked that the sub directory exists (and perhaps created
it), Camel tries to go back to the original directory which is "/". The SftpOperations.changeCurrentDirectory()
method calls the FileUtil.compactPath() method that incorrecly changes "/" to "//". The bug
thus resides in the FileUtil class which is part of camel-core.
> I think this bug may cause a number of other errors than the one I have enountered. E
g it cannot be possible to change direcotory to "/" at all. And, other protocols (like ftp/ftps)
might also be affected.
> This has been discussed on Camel user list:

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message