1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-16 21:35:24 +00:00

Add emptiness check for /url save and /plugins install

Empty file is not a normal condition for file downloading,
thus user has to be notifed.

Related to https://github.com/profanity-im/profanity/issues/1901
This commit is contained in:
John Hernandez 2023-11-10 19:58:34 +01:00
parent 30fe5f0fb9
commit 092b5530b2

View File

@ -176,6 +176,10 @@ http_file_get(void* userdata)
err = strdup(curl_easy_strerror(res));
}
if (ftell(outfh) == 0) {
err = strdup("Output file is empty.");
}
curl_easy_cleanup(curl);
curl_global_cleanup();