index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Dave Reisner <dreisner@archlinux.org> | 2011-08-19 14:07:29 -0400 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-08-19 19:00:58 -0500 |
commit | 82fc816d790ac8b2bfaa81575bf85067769ece10 (patch) | |
tree | 051d595f5a96f58fab5836d2e942b5620004cfee | |
parent | 43940f591ed77f984c49fe8a3629d66dbf78bfb0 (diff) |
-rw-r--r-- | lib/libalpm/dload.c | 4 |
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index c8f52c48..98a7cf85 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -319,6 +319,10 @@ static int curl_download_internal(struct dload_payload *payload, case CURLE_ABORTED_BY_CALLBACK: goto cleanup; default: + /* delete zero length downloads */ + if(stat(tempfile, &st) == 0 && st.st_size == 0) { + payload->unlink_on_fail = 1; + } if(!payload->errors_ok) { handle->pm_errno = ALPM_ERR_LIBCURL; _alpm_log(handle, ALPM_LOG_ERROR, _("failed retrieving file '%s' from %s : %s\n"), |