commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Goers (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (VFS-286) SFTP: getChildren() does not restore working dir if exception is thrown
Date Tue, 03 Nov 2009 19:01:32 GMT

     [ https://issues.apache.org/jira/browse/VFS-286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ralph Goers resolved VFS-286.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 2.0

The patch was applied. Please verify.

> SFTP: getChildren() does not restore working dir if exception is thrown
> -----------------------------------------------------------------------
>
>                 Key: VFS-286
>                 URL: https://issues.apache.org/jira/browse/VFS-286
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: Nightly Builds
>            Reporter: Kirill Safonov
>            Priority: Critical
>             Fix For: 2.0
>
>         Attachments: VFS-286.patch
>
>
> SftpFileObject.doListChildrenResolved() changes the working dir before doing ChannelSftp.ls()
call. If ls() throws an exception (in my case it's SftpException "No such file" when trying
to list the contents of "/dev/cdrom"), the execution is blown out the method and channel.cd(workingDirectory)
is not performed. *All* the subsequent operations that rely on the current dir will fail trying
to cd() into unexisting directory.
> The fix will be to move the channel.cd(workingDirectory); part into the finally {} block
below

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message