mirror of
https://github.com/moparisthebest/pacman
synced 2025-03-01 09:51:50 -05:00
makepkg: remove empty .part files after a failed download
Signed-off-by: Cedric Staniewski <cedric@gmx.ca> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
3758ccbb52
commit
c6095e1032
@ -336,7 +336,12 @@ download_file() {
|
||||
dlcmd="$dlcmd \"$url\""
|
||||
fi
|
||||
|
||||
eval $dlcmd || return $?
|
||||
local ret=0
|
||||
eval "$dlcmd || ret=\$?"
|
||||
if [ $ret -gt 0 ]; then
|
||||
[ ! -s "$dlfile" ] && rm -f -- "$dlfile"
|
||||
return $ret
|
||||
fi
|
||||
|
||||
# rename the temporary download file to the final destination
|
||||
if [ "$dlfile" != "$file" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user