Skip to content

Commit 727c3a0

Browse files
committed
dose not load files in symbol links
1 parent 601ad6e commit 727c3a0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# changelog
22

33
## 3.2.3
4+
* `CHG` dose not load files in symbol links
45
* `FIX` diagnostic: send empty results to every file after startup
56

67
## 3.2.2

script/workspace/workspace.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,18 @@ local globInteferFace = {
6868
type = function (path)
6969
local result
7070
pcall(function ()
71-
if fs.is_directory(fs.path(path)) then
71+
local status = fs.symlink_status(path):type()
72+
if status == 'directory' then
7273
result = 'directory'
73-
else
74+
elseif status == 'regular' then
7475
result = 'file'
7576
end
7677
end)
7778
return result
7879
end,
7980
list = function (path)
8081
local fullPath = fs.path(path)
81-
if not fs.exists(fullPath) then
82+
if fs.symlink_status(fullPath):type() ~= 'directory' then
8283
return nil
8384
end
8485
local paths = {}

0 commit comments

Comments
 (0)