plenary.nvim icon indicating copy to clipboard operation
plenary.nvim copied to clipboard

fix(path): find_upwards() failure case is an infinite loop

Open shreve opened this issue 2 years ago • 1 comments

The prior implementation had several implementation issues which caused an infinite loop if the search turned up empty.

This new implementation corrects the bounds check to stop searching once we've searched everywhere we can, and properly searches the root directory.

I'm not sure if this specific change is welcome here, but I also tweaked Path:joinpath to trim tailing separators to prevent double separators when joining on root.

shreve avatar Jul 04 '23 02:07 shreve

@Conni2461 do you have any additional input on this? Would love to see this issue resolved.

zapling avatar Aug 30 '23 08:08 zapling