summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-10-17 04:37:59 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-10-17 04:37:59 (GMT)
commit185403c681c9c6b57de7ddb31091541b81683d44 (patch)
tree5966e42673f882b562063344ac1eeabba43ac1bb
parent89151f999c6f9ee9d8f19af3c34206bba14b799c (diff)
downloadeeshow-185403c681c9c6b57de7ddb31091541b81683d44.zip
eeshow-185403c681c9c6b57de7ddb31091541b81683d44.tar.gz
eeshow-185403c681c9c6b57de7ddb31091541b81683d44.tar.bz2
eeshow-viewer: delete output file if wget fails
-rwxr-xr-xeeshow-viewer2
1 files changed, 1 insertions, 1 deletions
diff --git a/eeshow-viewer b/eeshow-viewer
index e28908e..f549160 100755
--- a/eeshow-viewer
+++ b/eeshow-viewer
@@ -60,7 +60,7 @@ fi
hash=`echo -n "$1" | tr -c '[[:alnum:].\-]' _`
file=$dir/$hash
if [ ! -r "$file" ]; then
- wget -O "$file" "$1" || exit 1
+ wget -O "$file" "$1" || { rm -f "$file"; exit 1; }
fi
$cache_only && exit