always remove temporary files

This commit is contained in:
Jack L. Frost 2015-10-13 13:57:56 +03:00
parent 1809fde7c9
commit af0b52e575
1 changed files with 2 additions and 0 deletions

2
sup
View File

@ -65,6 +65,7 @@ sup.get_hash() {
sup.upload() { sup.upload() {
if (( flag_scrot )); then if (( flag_scrot )); then
flag_rm=1
file=$(sup.scrot) || { return 1; } file=$(sup.scrot) || { return 1; }
else else
(( $# )) || { (( $# )) || {
@ -75,6 +76,7 @@ sup.upload() {
target="$1" target="$1"
if is_url "$target"; then if is_url "$target"; then
flag_rm=1
file=$(sup.mktemp "$cfg_tmp_dir") file=$(sup.mktemp "$cfg_tmp_dir")
curl -skL "$target" > "$file" || { curl -skL "$target" > "$file" || {