summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/dload.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/dload.c')
-rw-r--r--lib/libalpm/dload.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 23b8db72..dc4f91e5 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -373,8 +373,11 @@ cleanup:
}
if(ret == 0) {
- rename(tempfile, destfile);
- if(final_file) {
+ if(rename(tempfile, destfile)) {
+ _alpm_log(handle, ALPM_LOG_ERROR, _("could not rename %s to %s (%s)\n"),
+ tempfile, destfile, strerror(errno));
+ ret = -1;
+ } else if(final_file) {
*final_file = strdup(strrchr(destfile, '/') + 1);
}
}