mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-28 22:16:22 +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:
@@ -176,6 +176,10 @@ http_file_get(void* userdata)
|
|||||||
err = strdup(curl_easy_strerror(res));
|
err = strdup(curl_easy_strerror(res));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ftell(outfh) == 0) {
|
||||||
|
err = strdup("Output file is empty.");
|
||||||
|
}
|
||||||
|
|
||||||
curl_easy_cleanup(curl);
|
curl_easy_cleanup(curl);
|
||||||
curl_global_cleanup();
|
curl_global_cleanup();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user