Skip to content

Commit b01dc99

Browse files
committed
fix(#3196): utils.read_file may hold onto fd
Signed-off-by: Natalie Sepruko <[email protected]>
1 parent fefa335 commit b01dc99

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lua/nvim-tree/utils.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ function M.read_file(path)
2626
end
2727
local stat = vim.loop.fs_fstat(fd)
2828
if not stat then
29+
vim.loop.fs_close(fd)
2930
return ""
3031
end
3132
local data = vim.loop.fs_read(fd, stat.size, 0)

0 commit comments

Comments
 (0)