Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8002390

(zipfs) Problems moving files between zip file systems

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 8
    • 7, 7u9
    • core-libs
    • b87
    • generic
    • generic
    • Verified

    Backports

      Description

        While working with the new ZipFileSystem to modify the contents of a zip file, encountered some issues.

        The issue occurs when a file within a zip file is moved to a different location within the same zip and a FileVisitor is invoked by Files.walkFileTree the original (no longer existing file) will attempted to be visited by ZipFileSystemProvider and throw a NoSuchFileException.

         
        Attached is a standalone java file that can reproduce the issue.

        Tested this on Java 7 u9 and the issue still exists.

        The code creates a zip file with 5 elements in a sub directory, writes the content to disk, prints the contents of the zip file using Files.walkFileTree, moves one file from a subfolder to the root folder, then prints the contents of the zip file using Files.walkFileTree again.


        Attachments

          Issue Links

            Activity

              People

                msheppar Mark Sheppard
                tyao Ting-Yun Ingrid Yao (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: