From 1f4df6b8ff057df7f69e513ff7af321753982b79 Mon Sep 17 00:00:00 2001 From: Sandro642 Date: Thu, 24 Oct 2024 23:40:14 +0200 Subject: [PATCH] Refactor config path retrieval in landing.js Remove unused dataPath constant and replace its usage in mod validation error message with ConfigManager.getNameDataPath(). This ensures the config path is retrieved dynamically. --- app/assets/js/scripts/landing.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/assets/js/scripts/landing.js b/app/assets/js/scripts/landing.js index e23b0c43..df70a5f9 100644 --- a/app/assets/js/scripts/landing.js +++ b/app/assets/js/scripts/landing.js @@ -30,7 +30,6 @@ const { // Internal Requirements const DiscordWrapper = require('./assets/js/discordwrapper') const ProcessBuilder = require('./assets/js/processbuilder') -const dataPath = require('./assets/js/configmanager') const fs = require('fs') // Launch Elements @@ -614,7 +613,7 @@ async function dlAsync(login = true) { // Perform mod validation before proceeding if (!validateMods()) { - const errorMessage = Lang.queryJS('landing.dlAsync.AthShield.invalidModsDetectedMessage', {'folder': dataPath}) + const errorMessage = Lang.queryJS('landing.dlAsync.AthShield.invalidModsDetectedMessage', {'folder': ConfigManager.getNameDataPath()}) loggerLanding.error(errorMessage) showLaunchFailure(errorMessage, null) return