You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (JIRA)" <ji...@apache.org> on 2012/09/19 02:19:07 UTC
[jira] [Updated] (VFS-436) [FTP] VFS doesn't pull correctly when
pulling a directory that's symbolic linked
[ https://issues.apache.org/jira/browse/VFS-436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary D. Gregory updated VFS-436:
--------------------------------
Summary: [FTP] VFS doesn't pull correctly when pulling a directory that's symbolic linked (was: VFS doesn't pull correctly with FTP protocol when pulling a directory that's symbolic linked)
> [FTP] VFS doesn't pull correctly when pulling a directory that's symbolic linked
> --------------------------------------------------------------------------------
>
> Key: VFS-436
> URL: https://issues.apache.org/jira/browse/VFS-436
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: 2.0
> Environment: java version "1.7.0_02"
> Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)
> Linux version 2.6.18-238.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Thu Jan 13 15:51:15 EST 2011
> Reporter: Jason
> Priority: Blocker
>
> With the setting below, VFS doesn't pull the ftp directory successfully.
> Attempt to pull with
> ftp://root:password@ip:/softLinkTest/yes
> yes directory has the following info
> lrwxrwxrwx 1 root root 10 Sep 13 13:35 yes -> /root/tmp/
> I set builder.setUserDirIsRoot( opts, true ). It works fine when it sets it to false.
> When it runs through the getType() method after knowing it is a symbolic link, it tries to find the real directory's children but will return an empty array even though there's files listed under.
> I debugged through the source code, the reason is caused by the fix to 307 in FTPClientWrapper line 134
> // VFS-307: no check if we can simply list the files, this might fail if there are spaces in the path
> files = getFtpClient().listFiles(relPath);
> if (FTPReply.isPositiveCompletion(getFtpClient().getReplyCode()))
> {
> return files;
> }
> If those lines are removed, it will work successfully.
> Recommend to remove those lines
--
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: http://www.atlassian.com/software/jira