commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (VFS-436) VFS doesn't pull correctly with FTP protocol when pulling a directory that's symbolic linked
Date Mon, 17 Sep 2012 23:33:07 GMT

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

Jason updated VFS-436:
----------------------

    Description: 
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




  was:
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/

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.

The issue occurs when I set builder.setUserDirIsRoot( opts, true ). It works fine when it
sets it to false.

Recommend to remove those lines




    
> VFS doesn't pull correctly with FTP protocol 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

Mime
View raw message