diff --git a/craftingTurtle.lua b/craftingTurtle.lua index cf8a8e1..613db6d 100644 --- a/craftingTurtle.lua +++ b/craftingTurtle.lua @@ -19,7 +19,10 @@ local CRAFT_SLOTS = {1, 2, 3, 5, 6, 7, 9, 10, 11} -- Load config from file if present ------------------------------------------------- -local TURTLE_CONFIG_FILE = ".turtle_config" +local _baseDir = fs.getDir(shell.getRunningProgram()) +local function _path(rel) return fs.combine(_baseDir, rel) end + +local TURTLE_CONFIG_FILE = _path(".turtle_config") local function loadConfig() if not fs.exists(TURTLE_CONFIG_FILE) then return end