summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-09-04 13:10:08 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-09-04 13:10:08 +0800
commit3087a24d9a9ebecf7c7f2b603ad7c6277051da54 (patch)
tree181266d2c7526bdf4893e2a24a6f5ddc4016fadf
parent4fdda402193bf0600b42786a6571cea4e64ee5c9 (diff)
downloadlua-language-server-3087a24d9a9ebecf7c7f2b603ad7c6277051da54.zip
修正一些bug
-rw-r--r--server/main.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/server/main.lua b/server/main.lua
index 56d9d994..1f4bfac7 100644
--- a/server/main.lua
+++ b/server/main.lua
@@ -1,11 +1,8 @@
local currentPath = debug.getinfo(1, 'S').source:sub(2)
local rootPath = currentPath:gsub('[^/\\]-$', '')
-if rootPath == '' then
- rootPath = './'
-end
-dofile(rootPath .. 'platform.lua')
+dofile('./' .. rootPath .. 'platform.lua')
local fs = require 'bee.filesystem'
-ROOT = fs.absolute(fs.path(rootPath):parent_path())
+ROOT = fs.absolute(fs.path(rootPath)):parent_path():parent_path()
LANG = LANG or 'en-US'
print(package.cpath)