Summary: | xdg-desktop-menu does not treat folders with spaces correctly | ||
---|---|---|---|
Product: | Portland | Reporter: | Antti Savolainen <antti.savo> |
Component: | xdg-utils | Assignee: | Portland Bugs <portland-bugs> |
Status: | RESOLVED MOVED | QA Contact: | |
Severity: | trivial | ||
Priority: | medium | CC: | hpj |
Version: | unspecified | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | contents of ~./.config/menus |
Description
Antti Savolainen
2017-10-19 19:59:51 UTC
Thanks for reporting this.
It looks like a bug in xdg-desktop-menu, which is a part of xdg-utils. It's a shell script, and from the looks of it it's not built to deal with filenames with spaces in them, e.g. it does this:
> for desktop_file in $directory_files; do ... done
...which breaks down when $directory_files expands to a list of names with spaces in them. There are ways to deal with this in shell scripts, but none of them are very pleasant (I suggest setting IFS='\n\t' and using arrays, but you have to make sure it works with bash, dash and maybe other shells).
As an a propos, I have correctly installed Wine menu files in ~/.config/menus/applications-merged/ with spaces in the directory names -- but I'm not sure what installed those.
I'm reassigning this bug to the appropriate product (which unfortunately is not that easy to locate).
I did a fresh install recently and noticed that after installing wine and a program with it that the menus folder doesn't have a symlink gnome-applications-merged or xfce-applications.menu at all. It only has applications-merged and a single .menu file for each of the .desktop files that you want to add to the menu. Possibly the reason why I was seeing duplicates in the whiskers menu. -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xdg/xdg-utils/issues/117. |
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.