Skip to content

Commit

Permalink
Merge pull request #351 from lherschi/backportOf288
Browse files Browse the repository at this point in the history
backport of #288
  • Loading branch information
sclassen authored Aug 2, 2019
2 parents 3a500d8 + 10a7834 commit b611e63
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions netx/net/sourceforge/jnlp/util/WindowsDesktopEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,12 @@ public void createWindowsMenu() throws IOException {
sl.setIconLocation(iconLocation);
ul.setIconLocation(iconLocation);
}
sl.saveTo(path + "/" + file.getInformation().getTitle()+ ".lnk");
ul.saveTo(path + "/Uninstall " + file.getInformation().getTitle() + ".lnk");
final String link = FileUtils.sanitizeFileName(file.getInformation().getTitle() + ".lnk", '-');
sl.saveTo(path + "/" + link);
ul.saveTo(path + "/Uninstall " + link);
// write shortcuts to list
manageShortcutList(ManageMode.A, path + "/" + file.getInformation().getTitle() + ".lnk");
manageShortcutList(ManageMode.A, path + "/Uninstall " + file.getInformation().getTitle() + ".lnk");
manageShortcutList(ManageMode.A, path + "/" + link);
manageShortcutList(ManageMode.A, path + "/Uninstall " + link);
}

private void manageShortcutList(ManageMode mode, String path) throws IOException {
Expand Down

0 comments on commit b611e63

Please sign in to comment.