[pacman-dev] [PATCH] makepkg: remove .part file after a failed download
Cedric Staniewski
cedric at gmx.ca
Wed Oct 21 13:13:36 EDT 2009
Signed-off-by: Cedric Staniewski <cedric at gmx.ca>
---
scripts/makepkg.sh.in | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 40367ae..f6b87c2 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -336,7 +336,12 @@ download_file() {
dlcmd="$dlcmd \"$url\""
fi
- eval $dlcmd || return $?
+ eval $dlcmd
+ local ret=$?
+ if [ $ret -gt 0 ]; then
+ rm -f -- "$dlfile"
+ return $ret
+ fi
# rename the temporary download file to the final destination
if [ "$dlfile" != "$file" ]; then
--
1.6.5.1
More information about the pacman-dev
mailing list