Skip to content

Commit 71f3b8e

Browse files
authored
fix(setup): hijack on bufname instead of path (#1719)
1 parent 40dd577 commit 71f3b8e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lua/neo-tree/setup/netrw.lua

+4-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ M.hijack = function(path)
3232
end
3333

3434
-- ensure this is a directory
35-
local bufname = path or vim.api.nvim_buf_get_name(0)
35+
local bufname = vim.api.nvim_buf_get_name(0)
36+
if not utils.truthy(bufname) then
37+
bufname = path or ""
38+
end
3639
local stats = vim.loop.fs_stat(bufname)
3740
if not stats then
3841
return false

0 commit comments

Comments
 (0)