qubes.GetImageRGBA: fix handling '-' path without explicit type

There was a bug that interpreted '-' as file type. But convert don't
know how to handle '-' file type, so refused to proceed.

Fixes QubesOS/qubes-issues#3085
This commit is contained in:
Marek Marczykowski-Górecki 2017-12-22 03:50:48 +01:00
parent e8656e1b41
commit ec83df64e3
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -12,7 +12,7 @@ if [ "${filename%%:*}" = xdgicon ]; then
elif [ "${filename}" = "-" ] || [ "${filename##*:}" = "-" ]; then
tmpfile="$(mktemp /tmp/qimg-XXXXXXXX)"
cat > "${tmpfile}"
if [ "${filename##*:}" = "-" ]; then
if [ "${filename%:*}" != "-" ]; then
filename="${filename%:*}:${tmpfile}"
else
filename="${tmpfile}"