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

(zipfs) ZipDirectoryStream yields a stream of absolute paths when directory is relative

    Details

    • Subcomponent:
    • Resolved In Build:
      b14
    • Verification:
      Verified

      Backports

        Description

        Files.newDirectortyStream specifies "The Path objects are obtained as if by resolving the name of the directory entry against dir". If the path to the directory is a relative path then the Path objects created for the entries in the directory should also be relative. The zip file system provider doesn't implement this correctly, e.g.

        Path dir = zipfs.getPath("META-INF");
        Files.list(dir).forEach(System.out::println)

        will print absolute paths (/META-INF/MANIFEST.MF for example) when it should print relative paths.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  sherman Xueming Shen
                  Reporter:
                  alanb Alan Bateman
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: