diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-03-03 11:09:52 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-03-03 11:09:52 +0800 |
commit | a4aa3dc17e2f738f39aa429c80fe15f8af81b5c4 (patch) | |
tree | c3657f9d39c62e0c887809757260d7c09388e97d /script/workspace | |
parent | b9e9b9e32f7f7d34dfaa1707f073d0b5fa456fcc (diff) | |
download | lua-language-server-a4aa3dc17e2f738f39aa429c80fe15f8af81b5c4.zip |
#436 cannot ignore case in non-Windows platforms
Diffstat (limited to 'script/workspace')
-rw-r--r-- | script/workspace/workspace.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua index 019eb363..231c638e 100644 --- a/script/workspace/workspace.lua +++ b/script/workspace/workspace.lua @@ -328,7 +328,10 @@ function m.findUrisByFilePath(path) if type(path) ~= 'string' then return {} end - local lpath = path:lower():gsub('[/\\]+', '/') + local lpath = path:gsub('[/\\]+', '/') + if platform.OS == 'Windows' then + lpath = lpath:lower() + end local vm = require 'vm' local resultCache = vm.getCache 'findUrisByRequirePath.result' if resultCache[path] then |