From 2e875208268f0bbc9927bb9b245b00031b6c07d9 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Wed, 4 Jan 2023 08:57:50 +0100 Subject: [PATCH] fix(util): assume type is file when no type is returned by scandir. Fixes #306 --- lua/lazy/core/util.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/lazy/core/util.lua b/lua/lazy/core/util.lua index f1784d6..6724088 100644 --- a/lua/lazy/core/util.lua +++ b/lua/lazy/core/util.lua @@ -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