From ec83df64e382167fb333fbe1cf0b171548a6cbe9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 22 Dec 2017 03:50:48 +0100 Subject: [PATCH] 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 --- qubes-rpc/qubes.GetImageRGBA | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubes-rpc/qubes.GetImageRGBA b/qubes-rpc/qubes.GetImageRGBA index ac13087..c683ad2 100755 --- a/qubes-rpc/qubes.GetImageRGBA +++ b/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}"