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

jdk/test/lib/FileInstaller doesn't work for directories

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • 9, 10
    • hotspot
    • b31

      in `preVisitDirectory`, `FileInstaller` uses `Path::relativize` incorrectly:
      {code}
               public FileVisitResult preVisitDirectory(Path file,
                       BasicFileAttributes attrs) throws IOException {
                  Path relativePath = file.relativize(copyFrom);
                  ...
      {code}

      where `copyFrom` is the directory which contains `file`, and `Path::relativize` returns a relative path for an argument against receiver, not the other way around.

            iignatyev Igor Ignatyev (Inactive)
            iignatyev Igor Ignatyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: