fix(from_entry): treat directories as valid paths (#2035)
This commit is contained in:
committed by
GitHub
parent
4afd1be74a
commit
f8047b8bc9
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user