diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-25 17:17:18 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-25 17:17:18 +0800 |
commit | 9e7944e17041f573729c57b2c3b5d711c63d6e32 (patch) | |
tree | 55bff8fb32325f66b5bf6f8b07d108ed982be6f5 /script/workspace/workspace.lua | |
parent | 33580c1dd7c5ce0c9829e976cacd94418846eece (diff) | |
download | lua-language-server-9e7944e17041f573729c57b2c3b5d711c63d6e32.zip |
fix path
Diffstat (limited to 'script/workspace/workspace.lua')
-rw-r--r-- | script/workspace/workspace.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua index f5431def..13208b75 100644 --- a/script/workspace/workspace.lua +++ b/script/workspace/workspace.lua @@ -320,9 +320,9 @@ function m.getRelativePath(uri) _, pos = m.normalize(path):find(m.path, 1, true) end if pos then - return m.normalize(path:sub(pos + 1)) + return m.normalize(path:sub(pos + 1)):gsub('^[/\\]+', '') else - return m.normalize(path) + return m.normalize(path):gsub('^[/\\]+', '') end end |