diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-08-18 19:51:39 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-08-18 19:51:39 +0800 |
commit | 1d0dc164b84fffdfe281615013278013baf9aae7 (patch) | |
tree | bbd3104f10e712c2be418a79dae0c6716b436d1c /script | |
parent | 9d955bee3c8471ecb2babc63be4794118890af14 (diff) | |
download | lua-language-server-1d0dc164b84fffdfe281615013278013baf9aae7.zip |
lower-case windows drive letters
Diffstat (limited to 'script')
-rw-r--r-- | script/file-uri.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/script/file-uri.lua b/script/file-uri.lua index 0749b1b9..add3a73c 100644 --- a/script/file-uri.lua +++ b/script/file-uri.lua @@ -47,11 +47,11 @@ function m.encode(path) path = '/' .. path end - -- lower-case windows drive letters in /C:/fff or C:/fff - -- local start, finish, drive = path:find '/(%u):' - -- if drive then - -- path = path:sub(1, start) .. drive:lower() .. path:sub(finish, -1) - -- end + --lower-case windows drive letters in /C:/fff or C:/fff + local start, finish, drive = path:find '/(%u):' + if drive then + path = path:sub(1, start) .. drive:lower() .. path:sub(finish, -1) + end local uri = 'file://' .. authority:gsub(escPatt, esc) |