summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-10-13 19:29:49 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-10-13 19:29:49 +0800
commit86300e67be801568667fc01328134022d3324a9e (patch)
tree4ccebbb3f8a6005f5f8f6dfc4845cdbb263a0b10
parentea0dbf6309c5205fe63400bb71d47676a3305835 (diff)
downloadlua-language-server-86300e67be801568667fc01328134022d3324a9e.zip
fix
-rw-r--r--main.lua2
-rw-r--r--script/brave/work.lua2
-rw-r--r--script/workspace/workspace.lua2
3 files changed, 3 insertions, 3 deletions
diff --git a/main.lua b/main.lua
index edbdae8c..ab7c8e83 100644
--- a/main.lua
+++ b/main.lua
@@ -54,7 +54,7 @@ log.debug('VERSION:', version.getVersion())
require 'tracy'
-xpcall(dofile, log.debug, ROOT / 'debugger.lua')
+xpcall(dofile, log.debug, (ROOT / 'debugger.lua'):string())
local service = require 'service'
diff --git a/script/brave/work.lua b/script/brave/work.lua
index 24debe83..e1c08a79 100644
--- a/script/brave/work.lua
+++ b/script/brave/work.lua
@@ -43,7 +43,7 @@ end)
brave.on('listDirectory', function (uri)
local path = fs.path(furi.decode(uri))
local uris = {}
- for child in path:list_directory() do
+ for child in fs.pairs(path) do
local childUri = furi.encode(child:string())
uris[#uris+1] = childUri
end
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua
index f7b2e97b..5b87b2bb 100644
--- a/script/workspace/workspace.lua
+++ b/script/workspace/workspace.lua
@@ -65,7 +65,7 @@ local globInteferFace = {
end
local paths = {}
pcall(function ()
- for fullpath in fullPath:list_directory() do
+ for fullpath in fs.pairs(fullPath) do
paths[#paths+1] = fullpath:string()
end
end)