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

SFTP getChildren() does not fail when called on a file

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Nightly Builds
    • Fix Version/s: 2.1
    • Labels:
      None
    • Environment:

      Description

      SFTP test testChildren(org.apache.commons.vfs2.test.ContentTests) fails

      I've tried this with Apache SSHd and Bitvise WinSSHD and I get the same failure.

      The test org.apache.commons.vfs2.test.ContentTests asks for the children (getChildren()) of a file1.txt file (not a folder) and does not fail.

      The test expects the getChildren() method to throw an exception.

      Instead, it returns one file, file1.txt itself.

      Under the covers, we do a "ls file1.txt", which returns "file1.txt".

      It looks like VFS-210 was an effort to optimize and reduce roundtrips but it may have broken this code.

      Thoughts on fixing this?

      In org.apache.commons.vfs2.provider.sftp.SftpFileObject.doListChildrenResolved()?

        Attachments

        1. vfs-382.diff
          13 kB
          Gary Gregory

          Activity

            People

            • Assignee:
              ggregory Gary Gregory
              Reporter:
              ggregory Gary Gregory
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: