From f5ffa77fa0613bda408a91a63f1c0ed5d8918a2a Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Tue, 3 May 2022 22:50:38 -0400 Subject: [PATCH] Warn on InvalidPathExceptions on shortcut creation --- src/qz/installer/WindowsInstaller.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/qz/installer/WindowsInstaller.java b/src/qz/installer/WindowsInstaller.java index e250ec274..c52f1c600 100644 --- a/src/qz/installer/WindowsInstaller.java +++ b/src/qz/installer/WindowsInstaller.java @@ -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; @@ -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; @@ -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