summaryrefslogtreecommitdiff
path: root/server/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server/main.lua')
-rw-r--r--server/main.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/server/main.lua b/server/main.lua
index a01db8cb..57f7c5d8 100644
--- a/server/main.lua
+++ b/server/main.lua
@@ -1,12 +1,10 @@
local currentPath = debug.getinfo(1, 'S').source:sub(2)
-local rootPath = currentPath:gsub('[^/\\]-$', '')
-dofile(rootPath .. 'platform.lua')
+local rootPath = currentPath:gsub('[/\\]*[^/\\]-$', '')
+dofile(rootPath .. '/platform.lua')
local fs = require 'bee.filesystem'
-ROOT = fs.absolute(fs.path(rootPath)):parent_path():parent_path()
+ROOT = fs.current_path() / rootPath
LANG = LANG or 'en-US'
-print(package.cpath)
-
--collectgarbage('generational')
collectgarbage("setpause", 100)
collectgarbage("setstepmul", 1000)