summaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.lua b/main.lua
index 4fa302ac..59cf9a89 100644
--- a/main.lua
+++ b/main.lua
@@ -27,7 +27,8 @@ end
loadArgs()
local currentPath = debug.getinfo(1, 'S').source:sub(2)
-local rootPath = currentPath:gsub('[/\\]*[^/\\]-$', '')
+local rootPath = currentPath:gsub('[/\\]*[^/\\]-$', '')
+
rootPath = (rootPath == '' and '.' or rootPath)
ROOT = fs.path(util.expandPath(rootPath))
LOGPATH = LOGPATH and util.expandPath(LOGPATH) or (ROOT:string() .. '/log')