delete downloaded file on curl error

This commit is contained in:
Robin Appelman 2023-08-30 20:53:15 +02:00
commit b44e863846

View file

@ -88,6 +88,7 @@ public onComplete(Handle:hndl, CURLcode:code, any hDLPack) {
curl_easy_strerror(code, sError, sizeof(sError));
PrintToChatAll("cURL error: %s", sError);
PrintToChatAll("cURL error code: %d", code);
DeleteFile(targetPath);
} else {
//PrintToChatAll("map size(%s): %d", targetPath, FileSize(targetPath));
if (FileSize(targetPath) < 1024) {