[Portland-bugs] [Bug 103363] update-desktop-database does not treat folders with spaces correctly

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Nov 5 20:40:43 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=103363

Hans Petter Jansson <hpj at copyleft.no> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|hpj at copyleft.no             |portland-bugs at lists.freedes
                   |                            |ktop.org
          Component|general                     |xdg-utils
            Product|desktop-file-utils          |Portland

--- Comment #1 from Hans Petter Jansson <hpj at copyleft.no> ---
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).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/portland-bugs/attachments/20171105/3ff927f1/attachment.html>


More information about the Portland-bugs mailing list