Skip to content

Commit 9e071eb

Browse files
committed
OWS-630: add more logging for desktop shortcuts
1 parent 5b82cc5 commit 9e071eb

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

core/src/main/java/net/sourceforge/jnlp/util/WindowsDesktopEntry.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public void createShortcutOnWindowsDesktop() throws IOException {
8989
sl.setIconLocation(iconLocation.get());
9090
}
9191
final String path = getDesktopLnkPath();
92-
LOG.debug("Desktop Link Path : {}", path);
92+
LOG.debug("Desktop Entry Link Path : {}", path);
9393
sl.saveTo(path);
9494
// write shortcut path to list
9595
manageShortcutList(path);
@@ -144,11 +144,14 @@ public void createWindowsMenu() throws IOException {
144144
ul.setIconLocation(iconLocation.get());
145145
}
146146
final String link = getShortcutFileName();
147-
sl.saveTo(path + "/" + link);
148-
ul.saveTo(path + "/Uninstall " + link);
147+
final String menuLinkpath = path + "/" + link;
148+
LOG.debug("Menu Entry Link Path : {}", menuLinkpath);
149+
sl.saveTo(menuLinkpath);
150+
final String uninstallLinkPath = path + "/Uninstall " + link;
151+
ul.saveTo(uninstallLinkPath);
149152
// write shortcuts to list
150-
manageShortcutList(path + "/" + link);
151-
manageShortcutList(path + "/Uninstall " + link);
153+
manageShortcutList(menuLinkpath);
154+
manageShortcutList(uninstallLinkPath);
152155
}
153156

154157
private void manageShortcutList(String path) throws IOException {

core/src/main/java/net/sourceforge/jnlp/util/XDesktopEntry.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ private void installMenuLauncher(AccessWarningPaneComplexReturn.ShortcutResult i
234234
try {
235235
File f = getLinuxMenuIconFile();
236236
FileUtils.saveFileUtf8(getContent(true, info), f);
237-
LOG.info("Menu item created: {}", f.getAbsolutePath());
237+
LOG.info("Installing Menu Launcher : Menu item created: {}", f.getAbsolutePath());
238238
} catch (FileNotFoundException e) {
239239
LOG.error(IcedTeaWebConstants.DEFAULT_ERROR_MESSAGE, e);
240240
} catch (IOException e) {
@@ -262,7 +262,7 @@ private void installDesktopLauncher(AccessWarningPaneComplexReturn.ShortcutResul
262262

263263
String[] execString = new String[] { "xdg-desktop-icon", "install", "--novendor",
264264
shortcutFile.getCanonicalPath() };
265-
LOG.debug("Executing: " + Arrays.toString(execString));
265+
LOG.debug("Installing Desktop Launcher : Executing: " + Arrays.toString(execString));
266266
ProcessBuilder pb = new ProcessBuilder(execString);
267267
pb.inheritIO();
268268
Process installer = pb.start();

0 commit comments

Comments
 (0)