diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-27 21:04:47 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-27 21:04:47 +0800 |
commit | 727c3a086091d1bc2f153c88e83d7118ce3d78d2 (patch) | |
tree | 5141211919d0b4aefbb30c22e8da4eaf97a9ecee /script/workspace/workspace.lua | |
parent | 601ad6e2487ef49bd9ec3e45377b854b239264cf (diff) | |
download | lua-language-server-727c3a086091d1bc2f153c88e83d7118ce3d78d2.zip |
dose not load files in symbol links
Diffstat (limited to 'script/workspace/workspace.lua')
-rw-r--r-- | script/workspace/workspace.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua index 26c3a3b2..33f8784d 100644 --- a/script/workspace/workspace.lua +++ b/script/workspace/workspace.lua @@ -68,9 +68,10 @@ local globInteferFace = { type = function (path) local result pcall(function () - if fs.is_directory(fs.path(path)) then + local status = fs.symlink_status(path):type() + if status == 'directory' then result = 'directory' - else + elseif status == 'regular' then result = 'file' end end) @@ -78,7 +79,7 @@ local globInteferFace = { end, list = function (path) local fullPath = fs.path(path) - if not fs.exists(fullPath) then + if fs.symlink_status(fullPath):type() ~= 'directory' then return nil end local paths = {} |