Skip to content

Commit c504fd7

Browse files
committed
prevent looping
1 parent dc23c60 commit c504fd7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lua/neo-tree/utils/init.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,9 @@ end
960960
---@return string? err Error string
961961
M.fs_parent = function(path, loose)
962962
path = M.path_join(vim.fn.getcwd(), path)
963+
if #M.abspath_prefix(path) == #path then
964+
return nil
965+
end
963966

964967
local stat = uv.fs_lstat(path)
965968

0 commit comments

Comments
 (0)