Skip to content
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

Delete directory does not check children #821

Closed
SammysHP opened this issue Mar 28, 2018 · 1 comment
Closed

Delete directory does not check children #821

SammysHP opened this issue Mar 28, 2018 · 1 comment

Comments

@SammysHP
Copy link

You can delete a node via m d and confirm via y. If the node is a directory which has children, you have to type yes instead. But this works only if you have opened the directory in nerdtree previously, it does not read the contents by itself automatically. So sometimes y is enough to delete a directory that is not empty.

(I would prefer an option to always confirm via y, but that is a different issue.)

PhilRunninger pushed a commit that referenced this issue Apr 2, 2018
Fixes #821. If a node isn't opened in NERDTree, it's children aren't
known yet, so when deleting the node (with `m`, `d`), the user isn't
properly asked to confirm the delete. It was going to the less strict
`Y`/`n` confirmation, instead of the `yes` confirmation for non-empty
directories.

This change checks to see if the node is opened already. If it is, the
existing getChildCount() function is used; otherwise, the disk is read
to get the number of children there.
@PhilRunninger
Copy link
Member

@SammysHP, I just created a pull request to fix this. Can you test it out for me?

Thanks!

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

No branches or pull requests

2 participants