qubes-rpc: fix broken temporary file deletion in qubes.GetImageRGBA
This commit is contained in:
parent
e924758c54
commit
20dd5d2d1a
@ -21,10 +21,10 @@ elif [ "${filename}" = "-" ] || [ "${filename##*:}" = "-" ]; then
|
||||
tmpfile="$(mktemp /tmp/qimg-XXXXXXXX)"
|
||||
cat > "${tmpfile}"
|
||||
if [ "${filename##*:}" = "-" ]; then
|
||||
tmpfile="${filename%:*}:${tmpfile}"
|
||||
fi
|
||||
filename="${filename%:*}:${tmpfile}"
|
||||
else
|
||||
filename="${tmpfile}"
|
||||
|
||||
fi
|
||||
elif ! [ -r "${filename}" ]; then
|
||||
exit 1
|
||||
fi
|
||||
@ -34,6 +34,6 @@ fi
|
||||
identify -format '%w %h\n' "$filename" | sed -e '/^$/d'
|
||||
convert -depth 8 "$filename" rgba:-
|
||||
|
||||
[ -n "${tmpfile}" ] && rm -f ${tmpfile} || true
|
||||
[ -n "${tmpfile}" ] && rm -f "${tmpfile}" || true
|
||||
|
||||
# vim: ft=sh ts=4 sw=4 et
|
||||
|
Loading…
Reference in New Issue
Block a user