* Fixed an error when trying to download to an unwritable location
This commit is contained in:
parent
99d0c00246
commit
3c7f616805
1 changed files with 4 additions and 0 deletions
|
@ -224,6 +224,10 @@ int _alpm_downloadfiles_forreal(pmlist_t *servers, const char *localpath,
|
||||||
server->s_url->offset = (off_t)0;
|
server->s_url->offset = (off_t)0;
|
||||||
dltotal_bytes = 0;
|
dltotal_bytes = 0;
|
||||||
localf = fopen(output, "w");
|
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 */
|
/* Progress 0 - initialize */
|
||||||
|
|
Loading…
Add table
Reference in a new issue