Skip to content

Commit

Permalink
Relative path for H1Prtl and fixed DirectoryNotEmptyException
Browse files Browse the repository at this point in the history
  • Loading branch information
SoyRA committed Jul 24, 2021
1 parent fb65373 commit 4404227
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions PNLauncher/src/symlink.java
Original file line number Diff line number Diff line change
Expand Up @@ -366,14 +366,16 @@ private void H1PrtlUpd() {
}


Path src = Paths.get(H1Prtl.toURI());
Path src = Paths.get(H1Prtl.toString());
Path destn = Paths.get("");
try {
Files.walk(src)
.filter(F -> !F.equals(src))
.filter(Files::isRegularFile)
//.forEach(F -> System.out.println(destn.resolve(src.relativize(F.getParent()))));
//.forEach(F -> System.out.println(F + " -> " + destn.resolve(src.relativize(F))));
.forEach(F -> {
try {
Files.createDirectories(destn.resolve(src.relativize(F.getParent())));
Files.copy(F, destn.resolve(src.relativize(F)), StandardCopyOption.REPLACE_EXISTING);
} catch (IOException e) {
// TODO Auto-generated catch block
Expand Down

0 comments on commit 4404227

Please sign in to comment.