← Back to team overview

desktop-packages team mailing list archive

[Bug 1488787] Re: xdg-icon-resource does not support filenames with spaces

 

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

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 2015-08-26T06:17:40+00:00 MestreLion wrote:

This is similar to bug #66605 but for xdg-icon-resource this time, and
has the same cause: unquoted var expansions.

Example:
~ $ xdg-icon-resource install --novendor --size 48 "./foo bar.png" foobar
/usr/bin/xdg-icon-resource: 790: [: /home/xxx/foo: unexpected operator

A real scenario is installing icons from software zip/tarballs where the
icon file is in a data dir deep down the archive tree, and paths can not
be renamed as the binary executable might have the path to this data dir
hardcoded.

A workaround is to copy the icon to a temp dir before using xdg-icon-
resource.

The unquoted var to fix this particular case is $icon_icon_file at line
397 of xdg-icon-resource.in ( http://cgit.freedesktop.org/xdg/xdg-
utils/tree/scripts/xdg-icon-resource.in#n397 ) (line 790 in 1.0.2, 953
in 1.1.0 rc3), but there are several other unquoted var occurrences in
code that might also cause trouble.

I'll post 2 patches, one fixing this critical occurrence only, and
another one quoting other vars I've spotted to minimize future issues.

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

------------------------------------------------------------------------
On 2015-08-26T06:43:01+00:00 MestreLion wrote:

Created attachment 117918
Quote a single occurrence to fix this bug

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

------------------------------------------------------------------------
On 2015-08-26T06:44:09+00:00 MestreLion wrote:

Created attachment 117919
Quote other occurrences that might cause trouble in the future

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


** Changed in: xdg-utils
       Status: Unknown => Confirmed

** 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/1488787

Title:
   xdg-icon-resource does not support filenames with spaces

Status in Xdg-utils:
  Confirmed
Status in xdg-utils package in Ubuntu:
  New

Bug description:
  As reported in an upstream bug, xdg-icon-resource does not handle
  paths (either filenames or dir names) containing spaces.

  Example:
  ~ $ xdg-icon-resource install --novendor --size 48 "./foo bar.png" foobar
  /usr/bin/xdg-icon-resource: 790: [: /home/xxx/foo: unexpected operator

  A patch is provided to be applied downstream in Ubuntu as a new
  upstream release of xdg-utils might take a while (the last one is from
  2011!)

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


References