Mercurial > hg > release > icedtea-web-1.7
changeset 1235:d0a5b33cf779
Fixed bug when generated desktop icon was not matched and user was asked for recreation
* netx/net/sourceforge/jnlp/util/XDesktopEntry.java: (getShortcutTmpFile) (getLinuxDesktopIconFile) (getLinuxMenuIconFile) now generate file name by same way. By new method getDesktopIconFileName which is using sanitizing getDesktopIconName.
author | Jiri Vanek <jvanek@redhat.com> |
---|---|
date | Tue, 09 Jun 2015 14:28:18 +0200 |
parents | 9b3cfdc71c60 |
children | f721899863b5 |
files | ChangeLog netx/net/sourceforge/jnlp/util/XDesktopEntry.java |
diffstat | 2 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Jun 09 13:02:00 2015 +0200 +++ b/ChangeLog Tue Jun 09 14:28:18 2015 +0200 @@ -1,3 +1,11 @@ +2015-06-09 Jiri Vanek <jvanek@redhat.com> + + Fixed bug when generated desktop icon was not matched and user was asked for recreation + * netx/net/sourceforge/jnlp/util/XDesktopEntry.java: (getShortcutTmpFile) + (getLinuxDesktopIconFile) (getLinuxMenuIconFile) now generate file name by + same way. By new method getDesktopIconFileName which is using sanitizing + getDesktopIconName. + 2015-06-01 Jiri Vanek <jvanek@redhat.com> SecurityDialog return type changed from Object (mostly int) to regular type
--- a/netx/net/sourceforge/jnlp/util/XDesktopEntry.java Tue Jun 09 13:02:00 2015 +0200 +++ b/netx/net/sourceforge/jnlp/util/XDesktopEntry.java Tue Jun 09 14:28:18 2015 +0200 @@ -266,7 +266,7 @@ public File getShortcutTmpFile() { String userTmp = PathsAndFiles.TMP_DIR.getFullPath(); - File shortcutFile = new File(userTmp + File.separator + FileUtils.sanitizeFileName(file.getTitle()) + ".desktop"); + File shortcutFile = new File(userTmp + File.separator + getDesktopIconFileName()); return shortcutFile; } @@ -497,11 +497,15 @@ } public File getLinuxDesktopIconFile() { - return new File(findFreedesktopOrgDesktopPathCatch() + "/" + getDesktopIconName() + ".desktop"); + return new File(findFreedesktopOrgDesktopPathCatch() + "/" + getDesktopIconFileName()); } public File getLinuxMenuIconFile() { - return new File(findAndVerifyJavawsMenuDir() + "/" + getDesktopIconName() + ".desktop"); + return new File(findAndVerifyJavawsMenuDir() + "/" + getDesktopIconFileName()); + } + + private String getDesktopIconFileName() { + return getDesktopIconName() + ".desktop"; } private static String findAndVerifyGeneratedJnlpDir() {