summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-08-16 17:20:32 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-08-16 17:20:32 +0800
commit61dcb4bfb8d6def480f80e9678af1adc8970e02d (patch)
treed70d6bdb2b6c90ef397c6798a310259b5e3e27b8 /server/src
parentf4b297542f2e5c9635aa602f66c96f8ec1c76e4f (diff)
downloadlua-language-server-61dcb4bfb8d6def480f80e9678af1adc8970e02d.zip
修正一个报错
Diffstat (limited to 'server/src')
-rw-r--r--server/src/uri.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/uri.lua b/server/src/uri.lua
index 35de8a74..4505d554 100644
--- a/server/src/uri.lua
+++ b/server/src/uri.lua
@@ -8,6 +8,9 @@ local OS = platform.OS == 'Windows' and 'win32' or 'unix'
local function decode(uri)
local obj = URI:new(uri)
+ if not obj.filesystem_path then
+ return ''
+ end
local fullPath = obj:filesystem_path(OS)
local path = fs.path(fullPath)
return path