mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-21 19:22:13 -08:00
Refactor dataPath assignment
Replaced direct assignment of `dataPath` with variable `nameDataPath` for consistent naming. Introduced `getNameDataPath` function to return the launcher directory name string.
This commit is contained in:
parent
9d4c8cc399
commit
48350019f2
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user