From fd4599262410cc0165a6c17fb624057a6b82d2b0 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 24 Nov 2011 17:58:44 +0100 Subject: remove fetched files even when upload failed If the upload failed and the user supplied multiple URLs, we will find those on the next run and try to upload them again. Signed-off-by: Florian Pritz --- fb.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fb.in b/fb.in index 68adf77..ead38ef 100644 --- a/fb.in +++ b/fb.in @@ -199,11 +199,10 @@ else continue fi for f in *; do - if do_upload "$f"; then - rm -f -- "$f" - else + if ! do_upload "$f"; then EXITCODE=1 fi + rm -f -- "$f" done else do_upload "$i" || EXITCODE=1 -- cgit v1.2.3-24-g4f1b