Refactor config file path to use dynamic base directory
This commit is contained in:
@@ -21,7 +21,10 @@ local ORDER_CHANNEL = 4201
|
||||
-- Load config from file if present
|
||||
-------------------------------------------------
|
||||
|
||||
local CONFIG_FILE = ".webbridge_config"
|
||||
local _baseDir = fs.getDir(shell.getRunningProgram())
|
||||
local function _path(rel) return fs.combine(_baseDir, rel) end
|
||||
|
||||
local CONFIG_FILE = _path(".webbridge_config")
|
||||
local API_KEY = nil -- optional API key for server auth
|
||||
|
||||
local function loadConfig()
|
||||
|
||||
Reference in New Issue
Block a user