Skip to content

Commit

Permalink
Fixes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
SoyRA committed Jul 24, 2021
1 parent 4032bf4 commit e630a63
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions PNLauncher/src/symlink.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,9 @@ public void chckPre() {


// Checks if the current directory has only PNLauncher.bat, PNLauncher.jar, PNLauncher.ini and Ayria
// Check if the current directory has any symlinks
List<Path> chckFiles = null, chckSymlink = null;
List<Path> chckFiles = null;
try {
chckFiles = Files.walk(Paths.get(""), 1).filter(F -> Files.isRegularFile(F) && !F.equals(Paths.get("PNLauncher.bat")) && !F.equals(Paths.get("PNLauncher.jar")) && !F.equals(iniFile.toPath()) && !F.equals(lnFile.toPath()) || Files.isDirectory(F) && !F.equals(Paths.get("")) && !F.equals(FLR.toPath())).collect(Collectors.toList());
chckSymlink = Files.walk(Paths.get("")).filter(Files::isSymbolicLink).collect(Collectors.toList());
} catch (IOException e) {
// TODO Auto-generated catch block
System.err.println("[ERROR] " + e);
Expand All @@ -117,19 +115,18 @@ public void chckPre() {
if (old == null || cur.equals(old)) {
// Do nothing a,a
} else {
if (!chckSymlink.isEmpty() && !getFlr().isEmpty()) {
moveFiles(0, old);
if (cur.equals("H1")) {
H1PrtlUpd();
if (new File("Ayria/PNL/" + cur).exists()) {
if (!getFlr().isEmpty()) {
moveFiles(0, old);
}
chckPost();
} else {
moveFiles(1, cur);
if (cur.equals("H1")) {
H1PrtlUpd();
}
chckPost();
} else {
moveFiles(0, old);
}
if (cur.equals("H1")) {
H1PrtlUpd();
}
chckPost();
}
}

Expand Down

0 comments on commit e630a63

Please sign in to comment.