summaryrefslogtreecommitdiff
path: root/script-beta
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-19 13:44:23 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-19 13:44:23 +0800
commiteec5e97c774a03e007a3ddb59fbf22c4765fd4f0 (patch)
tree3a868ce48613ef00fd2e25c26ff55acc5f39d876 /script-beta
parent62993f3889d0af482549de720c77b23cb0ff815f (diff)
downloadlua-language-server-eec5e97c774a03e007a3ddb59fbf22c4765fd4f0.zip
Windows 的盘符总是用大写
Diffstat (limited to 'script-beta')
-rw-r--r--script-beta/workspace/workspace.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script-beta/workspace/workspace.lua b/script-beta/workspace/workspace.lua
index a4acac79..96b982b8 100644
--- a/script-beta/workspace/workspace.lua
+++ b/script-beta/workspace/workspace.lua
@@ -290,6 +290,9 @@ end
function m.normalize(path)
if platform.OS == 'Windows' then
path = path:gsub('[/\\]+', '\\')
+ :gsub('^%a+%:', function (str)
+ return str:upper()
+ end)
else
path = path:gsub('[/\\]+', '/')
end