You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Kirill Safonov (JIRA)" <ji...@apache.org> on 2009/11/07 18:53:32 UTC
[jira] Closed: (VFS-286) SFTP: getChildren() does not restore
working dir if exception is thrown
[ https://issues.apache.org/jira/browse/VFS-286?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kirill Safonov closed VFS-286.
------------------------------
Verified and closed.
> 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.