index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Anatol Pomozov <anatol.pomozov@gmail.com> | 2020-07-13 09:35:34 -0700 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2020-07-14 23:43:10 +1000 |
commit | 14c0e53eed4bd0c090e7ed2ebad41335d323c86c (patch) | |
tree | f7b56bb46e766720a3038fda6f4402eab22745f9 /lib/libalpm | |
parent | 1fd95939dbee071f4d7fb30e19c5b3cb22969113 (diff) |
-rw-r--r-- | lib/libalpm/dload.c | 9 |
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index 343f5c78..673e769f 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -897,15 +897,18 @@ int SYMEXPORT alpm_fetch_pkgurl(alpm_handle_t *handle, const alpm_list_t *urls, for(i = payloads; i; i = i->next) { struct dload_payload *payload = i->data; - const char *filename; char *filepath; if(payload->signature) { continue; } - filename = mbasename(payload->destfile_name); - filepath = _alpm_filecache_find(handle, filename); + if(payload->destfile_name) { + const char *filename = mbasename(payload->destfile_name); + filepath = _alpm_filecache_find(handle, filename); + } else { + STRDUP(filepath, payload->tempfile_name, GOTO_ERR(handle, ALPM_ERR_MEMORY, err)); + } if(filepath) { alpm_list_append(fetched, filepath); } else { |