Skip to content

fix(filesystem): don't try to close nil dir #1735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 20, 2025

Conversation

AThePeanut4
Copy link
Contributor

In sync_scan, if fs_opendir errors then it will still try to run fs_closedir(dir), causing an error since dir is nil. The easiest way to reproduce the issue is to create a folder and remove all its permissions, then try to navigate to it in neo-tree.

I've also removed the pcall's around the uv functions, which are unnecessary since errors are returned rather than being "thrown".

Copy link
Collaborator

@pynappo pynappo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty!

@pynappo pynappo merged commit 2edd287 into nvim-neo-tree:main Mar 20, 2025
8 checks passed
@AThePeanut4 AThePeanut4 deleted the fix-dirclose-error branch March 20, 2025 19:45
@pynappo pynappo mentioned this pull request Apr 17, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants