<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - xdg-icon-resource does not support filenames with spaces"
href="https://bugs.freedesktop.org/show_bug.cgi?id=91758">91758</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>xdg-icon-resource does not support filenames with spaces
</td>
</tr>
<tr>
<th>Product</th>
<td>Portland
</td>
</tr>
<tr>
<th>Version</th>
<td>1.1.0 rc3
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>xdg-utils
</td>
</tr>
<tr>
<th>Assignee</th>
<td>portland-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>linux@rodrigosilva.com
</td>
</tr></table>
<p>
<div>
<pre>This is similar to <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - xdg-desktop-menu does not support filenames with spaces"
href="show_bug.cgi?id=66605">bug #66605</a> 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 (
<a href="http://cgit.freedesktop.org/xdg/xdg-utils/tree/scripts/xdg-icon-resource.in#n397">http://cgit.freedesktop.org/xdg/xdg-utils/tree/scripts/xdg-icon-resource.in#n397</a>
) (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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>