summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/dload.c6
-rw-r--r--lib/libalpm/util.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index c856e96c..15d75556 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -296,7 +296,11 @@ static int download_internal(const char *url, const char *localpath,
tv[1].tv_sec = ust.mtime;
utimes(tempfile, tv);
}
- rename(tempfile, destfile);
+ if(rename(tempfile, destfile)) {
+ _alpm_log(PM_LOG_ERROR, _("could not rename %s to %s (%s)\n"),
+ tempfile, destfile, strerror(errno));
+ ret = -1;
+ }
ret = 0;
cleanup:
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index a80a7327..458f750a 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -621,7 +621,7 @@ char *_alpm_filecache_find(const char* filename)
}
}
/* package wasn't found in any cachedir */
- return(NULL);
+ RET_ERR(PM_ERR_PKG_NOT_FOUND, NULL);
}
/** Check the alpm cachedirs for existance and find a writable one.