mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05: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:
parent
30fe5f0fb9
commit
092b5530b2
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user