diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2021-01-19 18:28:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-19 18:28:47 +0100 |
| commit | d75d9ae4281ca433e00f00904fc9fd2019775a3e (patch) | |
| tree | 3b86f8e31640ec57bc2fe39be1838eda3cbf6c3f /lua/telescope/path.lua | |
| parent | 7d4d3462e990e2af489eb285aa7041d0b787c560 (diff) | |
fix: error message too many open files (#432)
and buffer previewer still "erroring" out for builtin.buffers
Diffstat (limited to 'lua/telescope/path.lua')
| -rw-r--r-- | lua/telescope/path.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lua/telescope/path.lua b/lua/telescope/path.lua index 972974e..0d17c1a 100644 --- a/lua/telescope/path.lua +++ b/lua/telescope/path.lua @@ -68,7 +68,10 @@ end path.read_file_async = function(filepath, callback) vim.loop.fs_open(filepath, "r", 438, function(err_open, fd) - assert(not err_open, err_open) + if err_open then + print("We tried to open this file but couldn't. We failed with following error message: " .. err_open) + return + end vim.loop.fs_fstat(fd, function(err_fstat, stat) assert(not err_fstat, err_fstat) if stat.type ~= 'file' then return callback('') end |
