Uploaded image for project: 'ShrinkWrap'
  1. ShrinkWrap
  2. SHRINKWRAP-169

ArchiveFileSystem.isDirectory returns true if ArchivePath doesn't exist

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.0.0-alpha-10
    • None
    • ext-vfs3
    • None

    Description

      This test shows the failing case:

      /**

      • Ensures that {@link VirtualFile#isDirectory()}

        returns false for files

      • that do not exist
        */
        @Test
        public void nonExistentFilesAreNotDirectory() throws Exception { // Create and mount an archive final JavaArchive archive = ShrinkWrap.create(NAME_ARCHIVE, JavaArchive.class); final VirtualFile virtualFile = this.createAndMountArchive(archive); // Control final VirtualFile doesNotExistFile = virtualFile.getChild("doesnotexist"); Assert .assertFalse("Test should indicate that this file does not exist (control test)", doesNotExistFile.exists()); // Ensure file that doesn't exist does not report as directory Assert.assertFalse("File that doesn't exist should not report as a directory", doesNotExistFile.isDirectory()); }

      Attachments

        Activity

          People

            arubinge@redhat.com Andrew Rubinger (Inactive)
            arubinge@redhat.com Andrew Rubinger (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: