diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pacman/conf.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pacman/conf.c b/src/pacman/conf.c index a5804066..29e835ce 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -184,10 +184,14 @@ static int download_with_xfercommand(const char *url, const char *localpath, ret = -1; } else { /* download was successful */ + ret = 0; if(usepart) { - rename(tempfile, destfile); + if(rename(tempfile, destfile)) { + pm_printf(ALPM_LOG_ERROR, _("could not rename %s to %s (%s)\n"), + tempfile, destfile, strerror(errno)); + ret = -1; + } } - ret = 0; } cleanup: |