← Back to team overview

desktop-packages team mailing list archive

[Bug 1432932] Re: xdg-desktop-menu uninstall hangs if menu file names have spaces

 

Launchpad has imported 4 comments from the remote bug at
https://bugs.freedesktop.org/show_bug.cgi?id=69339.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2013-09-13T22:41:38+00:00 Martin von Gagern wrote:

Line 895 of the xdg-desktop-menu script passed a file name unquoted to
grep:

http://cgit.freedesktop.org/xdg/xdg-utils/tree/scripts/xdg-desktop-
menu?id=2baf6ae56f9b622ca51aa79ff370676aaef93908#n895

if grep 'generated and managed by xdg-desktop-menu' $menu_file >
/dev/null 2> /dev/null; then

On my system I have a file name containing the sequence ' - ', which
caused grep to read from stdin, with obscure side effects. I believe
that the command should be something like this:

grep 'ge…nu' -- "$menu_file"

Reply at: https://bugs.launchpad.net/ubuntu/+source/xdg-
utils/+bug/1432932/comments/1

------------------------------------------------------------------------
On 2013-09-16T12:48:03+00:00 Rdieter-math wrote:

Since the "-" character is treated as special by
http://standards.freedesktop.org/menu-spec/menu-spec-latest.html

I'd highly recommend .desktop files use it only to specify vendor as
referenced in the spec above.  Doing otherwise is just asking for
trouble.

(While researching this more, there are many occurances of unquoted file
access... fixing this potential problem fully will take some care).

Reply at: https://bugs.launchpad.net/ubuntu/+source/xdg-
utils/+bug/1432932/comments/2

------------------------------------------------------------------------
On 2013-09-16T13:05:11+00:00 Rdieter-math wrote:

Fixed the immediate problem anyway, thanks,

http://cgit.freedesktop.org/xdg/xdg-
utils/commit/?id=c96d7b00aca3da1b608fde5827d7fea8785b3cd3

Reply at: https://bugs.launchpad.net/ubuntu/+source/xdg-
utils/+bug/1432932/comments/4

------------------------------------------------------------------------
On 2013-09-16T14:02:27+00:00 Martin von Gagern wrote:

The desktop files in question were installed by Wine. They had the format
"wine-Programs-WindowsVendor-WindowsAppName.desktop"
i.e. "wine-" as vendor prefix, and then the directory structure inside the start menu encoded using "-" as structure separator. The way I read the spec you mentioned, that only specifies the part up to the first "-", i.e. "wine-". I can see no restriction on the part after that, although I might well have missed that.

In any case, even though I only had two instances of " - " inside
desktop files, I had a not more containing spaces, so xdg-desktop-menu
should be able to cope with these. Handling that single location is
therefore a step in the right direction. Thanks for fixing this.

Reply at: https://bugs.launchpad.net/ubuntu/+source/xdg-
utils/+bug/1432932/comments/5


** Changed in: xdg-utils
       Status: Unknown => Fix Released

** Changed in: xdg-utils
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to xdg-utils in Ubuntu.
https://bugs.launchpad.net/bugs/1432932

Title:
  xdg-desktop-menu uninstall hangs if menu file names have spaces

Status in Xdg-utils:
  Fix Released
Status in xdg-utils package in Ubuntu:
  Confirmed

Bug description:
  xdg-desktop-menu uninstall hangs if menu file names have spaces
  for example when uninstalling a custom menu it hangs on processing "$HOME/.config/menus/applications-merged/wine-Programs-Tina 9 - TI-Component Help.menu" file.

To manage notifications about this bug go to:
https://bugs.launchpad.net/xdg-utils/+bug/1432932/+subscriptions


References