simplified opening VERSIONS file

This commit is contained in:
Václav Šmejkal 2022-07-24 16:43:03 +02:00
parent 1bc4a61b1b
commit 8617e4ca7e
No known key found for this signature in database
GPG Key ID: FD749A97DF2D5E19

View File

@ -79,15 +79,9 @@ _Bool checkVersion()
//FILE-CHECK VARIABLES //FILE-CHECK VARIABLES
int notFoundBuffer = 0; int notFoundBuffer = 0;
//REMOVE versions.json
if (access(VERSIONS_NAME, F_OK) == 0)
{
remove(VERSIONS_NAME);
}
//CURL VARIABLES //CURL VARIABLES
CURL *curl = curl_easy_init(); CURL *curl = curl_easy_init();
FILE *fileBuffer = fopen(VERSIONS_NAME, "w"); FILE *fileBuffer = fopen(VERSIONS_NAME, "w+");
//GET versions.json //GET versions.json
curl_easy_setopt(curl, CURLOPT_URL, VERSIONS_URL); curl_easy_setopt(curl, CURLOPT_URL, VERSIONS_URL);