summaryrefslogtreecommitdiff
path: root/script/workspace/workspace.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-21 10:14:34 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-21 10:14:34 +0800
commit2c59b675487e493bdcfc528f2cab654e6de1c262 (patch)
tree7515e0cebf2af648e4207f71337734f0bdcd6513 /script/workspace/workspace.lua
parent400f10e96c42b4ef3e42aae2d94de4dce60156c7 (diff)
downloadlua-language-server-2c59b675487e493bdcfc528f2cab654e6de1c262.zip
fix
Diffstat (limited to 'script/workspace/workspace.lua')
-rw-r--r--script/workspace/workspace.lua10
1 files changed, 1 insertions, 9 deletions
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua
index 5f998feb..fe709453 100644
--- a/script/workspace/workspace.lua
+++ b/script/workspace/workspace.lua
@@ -35,19 +35,11 @@ function m.init(uri)
end
local function interfaceFactory(root)
- -- TODO: need flush!!!
- local mark = {}
return {
type = function (path)
local result
pcall(function ()
- local abspath = fs.absolute(fs.path(root .. '/' .. path))
- local abskey = abspath:string():lower()
- if mark[abskey] then
- --return nil
- end
- mark[abskey] = true
- if fs.is_directory(abspath) then
+ if fs.is_directory(path) then
result = 'directory'
else
result = 'file'