Skip to content

Commit

Permalink
fix(util): assume type is file when no type is returned by scandir. F…
Browse files Browse the repository at this point in the history
…ixes #306
  • Loading branch information
folke committed Jan 4, 2023
1 parent e61b334 commit 2e87520
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/lazy/core/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ function M.ls(path, fn)
local handle = vim.loop.fs_scandir(path)
while handle do
local name, t = vim.loop.fs_scandir_next(handle)
-- HACK: assume type is a file if no type returned
-- see https://github.com/folke/lazy.nvim/issues/306
t = t or "file"
if not name then
break
end
Expand Down

0 comments on commit 2e87520

Please sign in to comment.