Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorAaron Griffin <aaron@archlinux.org>2006-11-22 04:25:31 +0000
committerAaron Griffin <aaron@archlinux.org>2006-11-22 04:25:31 +0000
commit3c7f616805b4e7b29a1b5ef8cf218627c9da34bd (patch)
tree1c33ad8413d8ddb09841d629b7f60961d9c79707 /lib/libalpm
parent99d0c0024624c7241a7f5e0d1d3f8b1c6f96a19e (diff)
* Fixed an error when trying to download to an unwritable location
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/server.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libalpm/server.c b/lib/libalpm/server.c
index 90466e32..f2e4afdf 100644
--- a/lib/libalpm/server.c
+++ b/lib/libalpm/server.c
@@ -224,6 +224,10 @@ int _alpm_downloadfiles_forreal(pmlist_t *servers, const char *localpath,
server->s_url->offset = (off_t)0;
dltotal_bytes = 0;
localf = fopen(output, "w");
+ if(localf == NULL) { /* still null? */
+ _alpm_log(PM_LOG_ERROR, _("cannot write to file '%s'"), output);
+ return -1;
+ }
}
/* Progress 0 - initialize */