Browse Source

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
Marek Marczykowski-Górecki 6 years ago
parent
commit
ec83df64e3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      qubes-rpc/qubes.GetImageRGBA

+ 1 - 1
qubes-rpc/qubes.GetImageRGBA

@@ -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}"