Summary: | xdg-desktop-menu does not support filenames with spaces | ||
---|---|---|---|
Product: | Portland | Reporter: | Matt Giuca <mgiuca> |
Component: | xdg-utils | Assignee: | Portland Bugs <portland-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | Martin.vGagern |
Version: | 1.1.0 rc1 | Keywords: | patch |
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Matt Giuca
2013-07-05 00:39:59 UTC
Fixing this could get a little ugly... in the meantime I would simply and strongly recommend avoiding the use of .desktop filenames with spaces (converting " " to "_" or something...) This affects more than just installing `.desktop` files. It also affects uninstalling *any* .directory file, with spaces or not, if `XDG_CONFIG_HOME/menus/applications-merged` contains a `.menu` file with spaces. In this case, a simple `xdg-desktop-menu uninstall vendor-foo.directory vendor-bar.desktop` *freezes*. Notice there's no spaces in those names! This was reported in Ubuntu as https://bugs.launchpad.net/xdg-utils/+bug/1432932 , and it contains a working patch that does not seem ugly: it simply quotes the vars as they should be. "avoiding the use of .desktop filenames with spaces" is not always an option: wine creates such files, and they do so by design (its .menu files are named after their windows `.lnk` counterparts). So if a user has wine-installed games, no other software will be able to uninstall its own .directory files! Any chance this patch could be merged? By the way, I can see one of such unquoted vars was already fixed in git repository in commit http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=c96d7b00aca3da1b608fde5827d7fea8785b3cd3 , which is great... thanks Rex Dieter! This commit fixes the particular case of wine .menu files, which do not contain the 'generated and managed' "tag". But for a more general solution, there is another occurrence of the same var unquoted a few lines below at http://cgit.freedesktop.org/xdg/xdg-utils/tree/scripts/xdg-desktop-menu.in#n306 and a few lines above at #288. Care to fix those too? Thanks! Thanks for the pointer, http://cgit.freedesktop.org/xdg/xdg-utils/commit/?id=236c283ec94e097986015e6f84c189a8e09e4aed |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.