Merge remote-tracking branch 'origin/pr/26'

* origin/pr/26:
  qubes-rpc: fix broken temporary file deletion in qubes.GetImageRGBA
This commit is contained in:
Marek Marczykowski-Górecki 2015-09-28 12:20:20 +02:00
commit abfc8d23e1
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -21,10 +21,10 @@ elif [ "${filename}" = "-" ] || [ "${filename##*:}" = "-" ]; then
tmpfile="$(mktemp /tmp/qimg-XXXXXXXX)"
cat > "${tmpfile}"
if [ "${filename##*:}" = "-" ]; then
tmpfile="${filename%:*}:${tmpfile}"
filename="${filename%:*}:${tmpfile}"
else
filename="${tmpfile}"
fi
filename="${tmpfile}"
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