From 4d8229ab464f7866f4c281068de7d47b2cda9c68 Mon Sep 17 00:00:00 2001 From: MayaTheShy Date: Sun, 22 Mar 2026 16:07:39 -0400 Subject: [PATCH] Refactor config file path to use dynamic base directory --- inventoryWebBridge.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inventoryWebBridge.lua b/inventoryWebBridge.lua index 51dff85..d1cd071 100644 --- a/inventoryWebBridge.lua +++ b/inventoryWebBridge.lua @@ -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()