From 8617e4ca7e9bcf4320ba44a123186d0b3f55fbd4 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sun, 24 Jul 2022 16:43:03 +0200 Subject: [PATCH] simplified opening VERSIONS file --- src/lib/misc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/lib/misc.c b/src/lib/misc.c index d76c11e..559c1a6 100644 --- a/src/lib/misc.c +++ b/src/lib/misc.c @@ -79,15 +79,9 @@ _Bool checkVersion() //FILE-CHECK VARIABLES int notFoundBuffer = 0; - //REMOVE versions.json - if (access(VERSIONS_NAME, F_OK) == 0) - { - remove(VERSIONS_NAME); - } - //CURL VARIABLES CURL *curl = curl_easy_init(); - FILE *fileBuffer = fopen(VERSIONS_NAME, "w"); + FILE *fileBuffer = fopen(VERSIONS_NAME, "w+"); //GET versions.json curl_easy_setopt(curl, CURLOPT_URL, VERSIONS_URL);