From 48350019f238fec22ad252cb627f5ee19135d38e Mon Sep 17 00:00:00 2001 From: Sandro642 Date: Thu, 24 Oct 2024 23:39:45 +0200 Subject: [PATCH] Refactor dataPath assignment Replaced direct assignment of `dataPath` with variable `nameDataPath` for consistent naming. Introduced `getNameDataPath` function to return the launcher directory name string. --- app/assets/js/configmanager.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/assets/js/configmanager.js b/app/assets/js/configmanager.js index ff1026bf..dbb87a12 100644 --- a/app/assets/js/configmanager.js +++ b/app/assets/js/configmanager.js @@ -7,7 +7,9 @@ const logger = LoggerUtil.getLogger('ConfigManager') const sysRoot = process.env.APPDATA || (process.platform == 'darwin' ? process.env.HOME + '/Library/Application Support' : process.env.HOME) -const dataPath = path.join(sysRoot, '.helioslauncher') +const nameDataPath = '.helioslauncher' + +const dataPath = path.join(sysRoot, nameDataPath) const launcherDir = require('@electron/remote').app.getPath('userData') @@ -18,7 +20,9 @@ const launcherDir = require('@electron/remote').app.getPath('userData') * * @type {string} */ -exports.dataPath = dataPath +exports.getNameDataPath = function(){ + return nameDataPath +} /** * Retrieve the absolute path of the launcher directory.