summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-21 15:37:18 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-21 15:37:18 +0800
commitdcab266b70941e3347ae158bdcdabf184b096ee9 (patch)
tree639027420bd9db66f98d6022473ac40c2563a62c /server/src
parentb96ced1cc366097052097e59468a925edfdfc57e (diff)
downloadlua-language-server-dcab266b70941e3347ae158bdcdabf184b096ee9.zip
必须匹配完整文件名
Diffstat (limited to 'server/src')
-rw-r--r--server/src/workspace.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/workspace.lua b/server/src/workspace.lua
index 655dd873..ff26ff53 100644
--- a/server/src/workspace.lua
+++ b/server/src/workspace.lua
@@ -117,7 +117,10 @@ function mt:findPath(baseUri, searchers)
for filename, uri in pairs(self.files) do
for _, searcher in ipairs(searchers) do
if filename:sub(-#searcher) == searcher then
- results[#results+1] = uri
+ local sep = filename:sub(-#searcher-1, -#searcher-1)
+ if sep == '/' or sep == '\\' then
+ results[#results+1] = uri
+ end
end
end
end