8158185: jdk/test/lib/FileInstaller throws NPE if dst is in current directory

Reviewed-by: kvn
This commit is contained in:
Igor Ignatyev 2016-05-31 16:29:45 +03:00
parent 7073d102f0
commit 708d50417c

@ -45,8 +45,8 @@ public class FileInstaller {
if (args.length != 2) {
throw new IllegalArgumentException("Unexpected number of arguments for file copy");
}
Path src = Paths.get(Utils.TEST_SRC, args[0]);
Path dst = Paths.get(args[1]);
Path src = Paths.get(Utils.TEST_SRC, args[0]).toAbsolutePath();
Path dst = Paths.get(args[1]).toAbsolutePath();
if (src.toFile().exists()) {
if (src.toFile().isDirectory()) {
Files.walkFileTree(src, new CopyFileVisitor(src, dst));