Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lua/mason-core/fs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ local function make_module(uv)
---@param path string
function M.fstat(path)
log.trace("fs: fstat", path)
local fd = uv.fs_open(path, "r", 438)
local ok, fd = pcall(uv.fs_open, path, "r", 438)
if ok == false then
error(fd)
end
if fd == nil then
error(fd)
end
local fstat = uv.fs_fstat(fd)
uv.fs_close(fd)
return fstat
Expand Down