From 5dca39a17e9a942e22b48a921128665f769d92b3 Mon Sep 17 00:00:00 2001 From: FinnHornhoover Date: Mon, 13 Nov 2023 23:06:38 +0300 Subject: [PATCH] fixed config json read, limited hash check --- assets/js/server-selector.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/server-selector.js b/assets/js/server-selector.js index 4e4a6ad..1ff8994 100644 --- a/assets/js/server-selector.js +++ b/assets/js/server-selector.js @@ -294,7 +294,7 @@ function restoreDefaultVersions() { } function editConfig() { - var jsonToModify = JSON.parse(remotefs.readJsonSync(configPath)); + var jsonToModify = JSON.parse(remotefs.readFileSync(configPath)); jsonToModify["autoupdate-check"] = $("#editconfig-autoupdate").prop("checked"); jsonToModify["cache-swapping"] = $("#editconfig-cacheswapping").prop("checked"); @@ -312,7 +312,7 @@ function editConfig() { remotefs.writeFileSync(configPath, JSON.stringify(jsonToModify, null, 4)); loadConfig(); - if (shouldChangeRoot) handleCache("hash-check"); + if (shouldChangeRoot) handleCache("hash-check", null, "offline"); } function validateCacheLocation() {