fix(from_entry): treat directories as valid paths (#2035)

This commit is contained in:
Fabian David Schmidt
2022-07-03 21:26:45 +03:00
committed by GitHub
parent 4afd1be74a
commit f8047b8bc9

View File

@@ -30,7 +30,9 @@ function from_entry.path(entry, validate, escape)
return return
end end
if validate and vim.fn.filereadable(path) == 0 then -- only 0 if neither filereadable nor directory
local invalid = vim.fn.filereadable(path) + vim.fn.isdirectory(path)
if validate and invalid == 0 then
return return
end end