From 7b821687a96858712d28aac5ff90078a524b5e21 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Sun, 26 Mar 2023 15:32:52 -0400 Subject: [PATCH] Update logging and location selection for presets --- Client/utilities/updatePresets.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Client/utilities/updatePresets.js b/Client/utilities/updatePresets.js index 2a7b526..41a5ab2 100644 --- a/Client/utilities/updatePresets.js +++ b/Client/utilities/updatePresets.js @@ -68,8 +68,9 @@ function convertFrequencyToHertz(frequency){ * @returns {any} The object containing the different systems the bot is near */ exports.getPresets = function getPresets() { - log.DEBUG(`Getting presets from directory: '${__dirname}'`); - return JSON.parse(fs.readFileSync( "./config/radioPresets.json")); + const presetDir = path.resolve("./config/radioPresets.json"); + log.DEBUG(`Getting presets from directory: '${presetDir}'`); + return JSON.parse(fs.readFileSync(presetDir)); } /**