[
https://issues.apache.org/jira/browse/VFS-436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bernd Eckenfels updated VFS-436:
--------------------------------
Priority: Major (was: Blocker)
> [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 ([email protected]) (gcc version
> 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Thu Jan 13 15:51:15 EST 2011
> Reporter: Jason
>
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)