diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-09-04 14:55:10 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-09-04 14:55:10 +0800 |
commit | 32bb0131c9bf221e60de8b3a0c4b3b382a7df4f3 (patch) | |
tree | af17a3c381e4dd74a480baf3ed60fd41f21438fe /server | |
parent | e942fb2edfc386c1d5bfbdc644ca370d1899e06b (diff) | |
download | lua-language-server-32bb0131c9bf221e60de8b3a0c4b3b382a7df4f3.zip |
不用 absolute
Diffstat (limited to 'server')
-rw-r--r-- | server/main.lua | 8 |
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) |