summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/dload.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/dload.c')
-rw-r--r--lib/libalpm/dload.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 7b114230..05813c40 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -535,7 +535,8 @@ static int curl_download_internal(struct dload_payload *payload,
if(payload->content_disp_name) {
/* content-disposition header has a better name for our file */
free(payload->destfile_name);
- payload->destfile_name = get_fullpath(localpath, payload->content_disp_name, "");
+ payload->destfile_name = get_fullpath(localpath,
+ get_filename(payload->content_disp_name), "");
} else {
const char *effective_filename = strrchr(effective_url, '/');
if(effective_filename && strlen(effective_filename) > 2) {