Skip to content

Commit

Permalink
Catch more InvalidPathExceptions on shortcut creation
Browse files Browse the repository at this point in the history
  • Loading branch information
tresf committed May 7, 2022
1 parent f5ffa77 commit 7be96b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/qz/installer/WindowsInstaller.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public Installer addStartupEntry() {
log.info("Creating startup entry \"{}\" -> \"{}\"", lnk, exe);
ShellLink link = ShellLink.createLink(exe, lnk);
link.setCMDArgs("--honorautostart"); // honors auto-start preferences
} catch(IOException | Win32Exception e) {
} catch(InvalidPathException | IOException | Win32Exception e) {
log.warn("Could not create startup launcher", e);
}
return this;
Expand Down
2 changes: 1 addition & 1 deletion src/qz/installer/shortcut/WindowsShortcutCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private void createShortcut(String folderPath) {
try {
ShellLink.createLink(getAppPath(), folderPath + File.separator + SHORTCUT_NAME);
}
catch(IOException ex) {
catch(InvalidPathException | IOException ex) {
log.warn("Error creating desktop shortcut", ex);
}
}
Expand Down

0 comments on commit 7be96b2

Please sign in to comment.