summaryrefslogtreecommitdiff
path: root/script/workspace
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-09-20 19:40:25 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-09-20 19:40:25 +0800
commitcf9e700078499bd363d00b6601a37c616f2ceae8 (patch)
treec4c3bccba003e658345e13acd149f9103853fe44 /script/workspace
parent33536b0453ec65d1d6abf3db72e057261b2a49be (diff)
downloadlua-language-server-cf9e700078499bd363d00b6601a37c616f2ceae8.zip
resolve #1177 re-support for symlinks
users need to maintain the correctness of symlinks themselves
Diffstat (limited to 'script/workspace')
-rw-r--r--script/workspace/workspace.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua
index 1b94f389..a1b54f24 100644
--- a/script/workspace/workspace.lua
+++ b/script/workspace/workspace.lua
@@ -90,10 +90,9 @@ local globInteferFace = {
type = function (path)
local result
pcall(function ()
- local status = fs.symlink_status(path):type()
- if status == 'directory' then
+ if fs.is_directory(path) then
result = 'directory'
- elseif status == 'regular' then
+ else
result = 'file'
end
end)
@@ -101,7 +100,7 @@ local globInteferFace = {
end,
list = function (path)
local fullPath = fs.path(path)
- if fs.symlink_status(fullPath):type() ~= 'directory' then
+ if not fs.is_directory(fullPath) then
return nil
end
local paths = {}