summaryrefslogtreecommitdiff
path: root/script/workspace
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-07-27 16:41:09 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-07-27 16:41:09 +0800
commitf8c9c70e8693a2471f914d47ed36bbe19c982f0c (patch)
tree9641f814cfb5a51d8bd06d5e4ed3d59e1070b26f /script/workspace
parent1de77a38e4ec3ea6cb1a2b2b3045c2c08f4311c0 (diff)
downloadlua-language-server-f8c9c70e8693a2471f914d47ed36bbe19c982f0c.zip
#1385
Diffstat (limited to 'script/workspace')
-rw-r--r--script/workspace/workspace.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua
index 11fe0dfa..973ae9ec 100644
--- a/script/workspace/workspace.lua
+++ b/script/workspace/workspace.lua
@@ -45,7 +45,9 @@ end
--- 初始化工作区
function m.create(uri)
- uri = furi.normalize(uri)
+ if furi.isValid(uri) then
+ uri = furi.normalize(uri)
+ end
log.info('Workspace create: ', uri)
if uri == furi.encode '/'
or uri == furi.encode(os.getenv 'HOME' or '') then