Skip to content

Commit

Permalink
fix: williamboman#1780 by using fs_stat if fs_readdir fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Captainfl4me committed Sep 4, 2024
1 parent e2f7f90 commit 4970e2b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/mason-core/fs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ local function make_module(uv)
log.trace("fs: fs_readdir", path, entries)
if entries and #entries > 0 then
for i = 1, #entries do
if entries[i].name and not entries[i].type then
local stat = uv.fs_stat(path .. "/" .. entries[i].name)
entries[i].type = stat.type
end
all_entries[#all_entries + 1] = entries[i]
end
else
Expand Down

0 comments on commit 4970e2b

Please sign in to comment.