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)"
|
tmpfile="$(mktemp /tmp/qimg-XXXXXXXX)"
|
||||||
cat > "${tmpfile}"
|
cat > "${tmpfile}"
|
||||||
if [ "${filename##*:}" = "-" ]; then
|
if [ "${filename##*:}" = "-" ]; then
|
||||||
tmpfile="${filename%:*}:${tmpfile}"
|
filename="${filename%:*}:${tmpfile}"
|
||||||
|
else
|
||||||
|
filename="${tmpfile}"
|
||||||
fi
|
fi
|
||||||
filename="${tmpfile}"
|
|
||||||
|
|
||||||
elif ! [ -r "${filename}" ]; then
|
elif ! [ -r "${filename}" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -34,6 +34,6 @@ fi
|
|||||||
identify -format '%w %h\n' "$filename" | sed -e '/^$/d'
|
identify -format '%w %h\n' "$filename" | sed -e '/^$/d'
|
||||||
convert -depth 8 "$filename" rgba:-
|
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
|
# vim: ft=sh ts=4 sw=4 et
|
||||||
|
Loading…
Reference in New Issue
Block a user