From f3dfba73d22b7eca3810a8114f2aab63da488b4c Mon Sep 17 00:00:00 2001 From: Anatol Pomozov Date: Mon, 18 May 2020 14:30:04 -0700 Subject: FS#33992: force download *.sig file if it does not exist in the cache In case if *.pkg exists but *.sig file does not we still have to pass the pkg to multi_download API. To avoid redownloading *.pkg file we use CURLOPT_TIMECONDITION curl option. Signed-off-by: Anatol Pomozov Signed-off-by: Allan McRae --- lib/libalpm/dload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libalpm/dload.c') diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index f8ee6f85..78808eb3 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -282,7 +282,7 @@ static void curl_set_handle_opts(CURL *curl, struct dload_payload *payload) curl_easy_setopt(curl, CURLOPT_USERAGENT, useragent); } - if(!payload->allow_resume && !payload->force && payload->destfile_name && + if(!payload->force && payload->destfile_name && stat(payload->destfile_name, &st) == 0) { /* start from scratch, but only download if our local is out of date. */ curl_easy_setopt(curl, CURLOPT_TIMECONDITION, CURL_TIMECOND_IFMODSINCE); -- cgit v1.2.3-54-g00ecf