diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-28 21:06:53 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-28 21:06:53 +0800 |
commit | 08b9dd387a9b912c68749018b7dfe3c1df7094d5 (patch) | |
tree | 46c81598c214b10643f3d8083bb7b64b9e2ba21c /script/workspace | |
parent | 9ad317f2a1eb8dc5715103c8c62e0fcff88a482b (diff) | |
download | lua-language-server-08b9dd387a9b912c68749018b7dfe3c1df7094d5.zip |
cleanup
Diffstat (limited to 'script/workspace')
-rw-r--r-- | script/workspace/require-path.lua | 3 | ||||
-rw-r--r-- | script/workspace/workspace.lua | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/script/workspace/require-path.lua b/script/workspace/require-path.lua index aec298a6..fbe559ad 100644 --- a/script/workspace/require-path.lua +++ b/script/workspace/require-path.lua @@ -51,7 +51,8 @@ function m.getVisiblePath(suri, path) and not scp:isLinkedUri(uri) then return {} end - local libraryPath = furi.decode(files.getLibraryUri(suri, uri)) + local libUri = files.getLibraryUri(suri, uri) + local libraryPath = libUri and furi.decode(libUri) local cache = scp:get('visiblePath') or scp:set('visiblePath', {}) local result = cache[path] if not result then diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua index 6425af06..9620f8a8 100644 --- a/script/workspace/workspace.lua +++ b/script/workspace/workspace.lua @@ -154,7 +154,7 @@ function m.getNativeMatcher(scp) end local matcher = glob.gitignore(pattern, { - root = furi.decode(scp.uri), + root = scp.uri and furi.decode(scp.uri), ignoreCase = platform.OS == 'Windows', }, globInteferFace) |