From f722b8699031a55cbe11d2818a745a1731e578fd Mon Sep 17 00:00:00 2001 From: morganamilo Date: Fri, 16 May 2025 23:24:40 +0100 Subject: [PATCH] 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. --- lib/libalpm/dload.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index acb8e16d..73392660 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -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);