summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-09-04 14:55:10 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-09-04 14:55:10 +0800
commit32bb0131c9bf221e60de8b3a0c4b3b382a7df4f3 (patch)
treeaf17a3c381e4dd74a480baf3ed60fd41f21438fe /server
parente942fb2edfc386c1d5bfbdc644ca370d1899e06b (diff)
downloadlua-language-server-32bb0131c9bf221e60de8b3a0c4b3b382a7df4f3.zip
不用 absolute
Diffstat (limited to 'server')
-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)