summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-05-18 17:01:57 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-05-18 17:01:57 +0800
commit78b9c3c05497eba53d9f618a79218a39c80c584d (patch)
treec7474a3d94eea7589c94b2a827ca4e6f9c1df6e1 /script
parente506f0f6348dc4c37ba2d4aefb936aeca2feea53 (diff)
downloadlua-language-server-78b9c3c05497eba53d9f618a79218a39c80c584d.zip
fix #538
Diffstat (limited to 'script')
-rw-r--r--script/workspace/workspace.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua
index fd0978b3..72a689c1 100644
--- a/script/workspace/workspace.lua
+++ b/script/workspace/workspace.lua
@@ -349,11 +349,11 @@ function m.findUrisByFilePath(path)
if platform.OS ~= 'Windows' then
uri = files.getOriginUri(uri)
end
- if not uri:find(lpath, 1, true) then
+ local curPath = furi.decode(files.getOriginUri(uri))
+ if not curPath:find(lpath, 1, true) then
goto CONTINUE
end
local pathLen = #path
- local curPath = furi.decode(files.getOriginUri(uri))
local curLen = #curPath
local seg = curPath:sub(curLen - pathLen, curLen - pathLen)
if seg == '/' or seg == '\\' or seg == '' then