Skip to content

Commit 547db6e

Browse files
committed
fix(#1831): remove error messages that were previously unreachable and add no value
1 parent d949af7 commit 547db6e

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

lua/nvim-tree/explorer/explore.lua

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ local explorer_node = require "nvim-tree.explorer.node"
44
local sorters = require "nvim-tree.explorer.sorters"
55
local filters = require "nvim-tree.explorer.filters"
66
local live_filter = require "nvim-tree.live-filter"
7-
local notify = require "nvim-tree.notify"
87
local log = require "nvim-tree.log"
98

109
local M = {}
@@ -46,18 +45,9 @@ local function populate_children(handle, cwd, node, git_status)
4645
end
4746
end
4847

49-
local function get_dir_handle(cwd)
50-
local handle, err = utils.fs_scandir_profiled(cwd)
51-
if err then
52-
notify.error(string.format("Failed exploring %s: %s", cwd, vim.inspect(err)))
53-
return
54-
end
55-
return handle
56-
end
57-
5848
function M.explore(node, status)
5949
local cwd = node.link_to or node.absolute_path
60-
local handle = get_dir_handle(cwd)
50+
local handle = utils.fs_scandir_profiled(cwd)
6151
if not handle then
6252
return
6353
end

lua/nvim-tree/explorer/reload.lua

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ local explorer_node = require "nvim-tree.explorer.node"
44
local filters = require "nvim-tree.explorer.filters"
55
local sorters = require "nvim-tree.explorer.sorters"
66
local live_filter = require "nvim-tree.live-filter"
7-
local notify = require "nvim-tree.notify"
87
local git = require "nvim-tree.git"
98
local log = require "nvim-tree.log"
109

@@ -36,9 +35,8 @@ end
3635

3736
function M.reload(node, git_status, unloaded_bufnr)
3837
local cwd = node.link_to or node.absolute_path
39-
local handle, err = utils.fs_scandir_profiled(cwd)
40-
if err then
41-
notify.error(string.format("Failed reloading %s: %s", cwd, vim.inspect(err)))
38+
local handle = utils.fs_scandir_profiled(cwd)
39+
if not handle then
4240
return
4341
end
4442

0 commit comments

Comments
 (0)