diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-07-08 15:59:23 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-07-08 15:59:23 +0800 |
commit | 77a276abe8281ac3b9892ecbc5d21c66c22801c7 (patch) | |
tree | dc6768605074aeca6b5e1706dd1645e56fd38b5c /script | |
parent | 4876958951dff23ed234523d89b47a854e88acea (diff) | |
download | lua-language-server-77a276abe8281ac3b9892ecbc5d21c66c22801c7.zip |
ignore case in Windows
Diffstat (limited to 'script')
-rw-r--r-- | script/library.lua | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/script/library.lua b/script/library.lua index 21004ab6..3d52baea 100644 --- a/script/library.lua +++ b/script/library.lua @@ -259,6 +259,17 @@ local function loadSingle3rdConfig(libraryDir) cfg[k] = v end + if cfg.files then + for i, filename in ipairs(cfg.files) do + if plat.OS == 'Windows' then + filename = filename:lower():gsub('/', '\\') + else + filename = filename:gsub('\\', '/') + end + cfg.files[i] = filename + end + end + return cfg end @@ -361,9 +372,6 @@ local function check3rdByFileName(uri, configs) if cfg.files then for _, filename in ipairs(cfg.files) do await.delay() - if plat.OS == 'Windows' then - filename = filename:lower() - end if path:match(filename) then askFor3rd(cfg) return |