Skip to content

Commit

Permalink
Warn on InvalidPathExceptions on shortcut creation
Browse files Browse the repository at this point in the history
  • Loading branch information
tresf committed May 4, 2022
1 parent 6230e4c commit f5ffa77
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/qz/installer/WindowsInstaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

import java.io.File;
import java.io.IOException;
import java.nio.file.InvalidPathException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
Expand Down Expand Up @@ -70,7 +71,7 @@ public Installer addAppLauncher() {
String exe = destination + File.separator + PROPS_FILE+ ".exe";
log.info("Creating launcher \"{}\" -> \"{}\"", lnk, exe);
ShellLink.createLink(exe, lnk);
} catch(IOException | Win32Exception e) {
} catch(InvalidPathException | IOException | Win32Exception e) {
log.warn("Could not create launcher", e);
}
return this;
Expand Down Expand Up @@ -105,7 +106,7 @@ public Installer removeSystemSettings() {
FileUtils.deleteQuietly(new File(folder + File.separator + "Programs" + File.separator + ABOUT_TITLE + ".lnk"));
FileUtils.deleteDirectory(new File(folder + File.separator + "Programs" + File.separator + ABOUT_TITLE));
}
} catch(IOException | Win32Exception ignore) {}
} catch(InvalidPathException | IOException | Win32Exception ignore) {}
}

// Cleanup firewall rules
Expand Down

0 comments on commit f5ffa77

Please sign in to comment.