xdg-icon-resource does not support filenames with spaces
Bug #1488787 reported by
MestreLion
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Xdg-utils |
Fix Released
|
Medium
|
|||
xdg-utils (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
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/
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!)
Related branches
Changed in xdg-utils: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Changed in xdg-utils: | |
status: | Confirmed → Fix Released |
To post a comment you must log in.
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: 790: [: /home/xxx/foo: unexpected operator
~ $ xdg-icon-resource install --novendor --size 48 "./foo bar.png" foobar
/usr/bin/
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.freedeskto p.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.