summaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/main.lua b/main.lua
index 63341d7f..ce43bebe 100644
--- a/main.lua
+++ b/main.lua
@@ -1,8 +1,4 @@
-local currentPath = debug.getinfo(1, 'S').source:sub(2)
-local rootPath = currentPath:gsub('[/\\]*[^/\\]-$', '')
-rootPath = (rootPath == '' and '.' or rootPath)
-loadfile(rootPath .. '/platform.lua')('script')
-local fs = require 'bee.filesystem'
+local fs = require 'bee.filesystem'
local util = require 'utility'
local version = require 'version'
@@ -29,6 +25,7 @@ end
loadArgs()
+local rootPath = fs.exe_path():parent_path():parent_path():parent_path():string()
ROOT = fs.path(util.expandPath(rootPath))
LOGPATH = LOGPATH and util.expandPath(LOGPATH) or (ROOT:string() .. '/log')
METAPATH = METAPATH and util.expandPath(METAPATH) or (ROOT:string() .. '/meta')