-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 9, 10
-
Component/s: 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.
{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.