mirror of https://github.com/folke/lazy.nvim.git
fix(util): assume type is file when no type is returned by scandir. Fixes #306
This commit is contained in:
parent
e61b334cee
commit
2e87520826
|
@ -171,6 +171,9 @@ function M.ls(path, fn)
|
||||||
local handle = vim.loop.fs_scandir(path)
|
local handle = vim.loop.fs_scandir(path)
|
||||||
while handle do
|
while handle do
|
||||||
local name, t = vim.loop.fs_scandir_next(handle)
|
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
|
if not name then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue