diff options
author | sumneko <sumneko@hotmail.com> | 2019-05-13 20:50:24 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-05-13 20:50:24 +0800 |
commit | 81d11002a4106954177ed3b8f714a886526fe598 (patch) | |
tree | a99e4df85d12a7f5fecd3b6366c740647ff12e4f | |
parent | 7ec2bb1ef16025f9cd208efb358c987bdefca7d3 (diff) | |
download | lua-language-server-81d11002a4106954177ed3b8f714a886526fe598.zip |
修正根节点没有计算相对路径的BUG
-rw-r--r-- | server/src/glob/gitignore.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/glob/gitignore.lua b/server/src/glob/gitignore.lua index 9ba2d564..108fcdb0 100644 --- a/server/src/glob/gitignore.lua +++ b/server/src/glob/gitignore.lua @@ -120,6 +120,7 @@ function mt:simpleMatch(path) end end end + return false end function mt:finishMatch(path) @@ -150,7 +151,7 @@ function mt:scan(callback) return files end for _, path in ipairs(result) do - list[#list+1] = path + list[#list+1] = path:match '([^/\\]+)[/\\]*$' end while #list > 0 do local current = list[#list] |