libalpm: return final final temp path in pkgurl

When downloading unnamed files via alpm_fetch_pkgurl the returned path
would point to the temp pkgcache instead of the final download location.
This commit is contained in:
morganamilo 2025-05-16 23:24:40 +01:00 committed by Allan McRae
parent 4ddc642398
commit f722b86990

View file

@ -1377,7 +1377,8 @@ int SYMEXPORT alpm_fetch_pkgurl(alpm_handle_t *handle, const alpm_list_t *urls,
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));
const char *filename = mbasename(payload->tempfile_name);
filepath = _alpm_filecache_find(handle, filename);
}
if(filepath) {
alpm_list_append(fetched, filepath);