summaryrefslogtreecommitdiff
path: root/lua/telescope/from_entry.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/telescope/from_entry.lua')
-rw-r--r--lua/telescope/from_entry.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/lua/telescope/from_entry.lua b/lua/telescope/from_entry.lua
index 83e5aca..b608023 100644
--- a/lua/telescope/from_entry.lua
+++ b/lua/telescope/from_entry.lua
@@ -30,7 +30,9 @@ function from_entry.path(entry, validate, escape)
return
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
end