Uploaded image for project: 'Commons VFS'
  1. Commons VFS
  2. VFS-310

FTP: improved 'LIST' command may work incorrectly with certain servers

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Nightly Builds
    • None
    • None

    Description

      FTP LIST command was enhanced recently to improve the performance: instead of stepping into the target directory, 'LIST <relpath>' is executed.
      Still, it may cause problems with certain FTP server software that returns child file names in relative form:

      > LIST test 
      150 Opening BINARY mode data connection for file list. 
      total 56 
      drwxrwx---   2 user     4096 May 17 14:07 test/css 
      drwxrwx---   2 user     4096 May 17 14:08 test/images 
      -rw-rw----   1 user     6397 May 17 14:07 test/index.html

      instead of

      drwxrwx---   2 user     4096 May 17 14:07 css 
      drwxrwx---   2 user     4096 May 17 14:08 images
      

      This results in an immediate error, such as:
      org.apache.commons.vfs.FileSystemException: Invalid descendent file name "test/css".
      at org.apache.commons.vfs.impl.DefaultFileSystemManager.resolveName(DefaultFileSystemManager.java:790)
      at org.apache.commons.vfs.provider.AbstractFileObject.getChildren(AbstractFileObject.java:689)
      at org.apache.commons.vfs.provider.ftp.FtpFileObject.getChildren(FtpFileObject.java:453)

      The desired solution is Commons VFS expects such behaviour and strips the leading part of files names (if possible?)
      At least, FtpFileSystemConfigBuilder should provide an option to fallback to previous (slower) way of listing children.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            ksafonov Kirill Safonov

            Dates

              Created:
              Updated:

              Slack

                Issue deployment