-
Notifications
You must be signed in to change notification settings - Fork 774
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
emptyDir callback firing twice on EPERM error #392
Comments
@kueckermann Does the callback call with the exact same error both times? Can't see how this could happen in the code, but it wouldn't hurt to port the internals to promises to make sure this doesn't happen. @manidlou do you want to do this? |
@RyanZim Looks like they are both EPERM but different functions (unlink and lstat).
|
OK, this one is going to take a little digging. Given that this error originates from Could you post the stack traces for both errors? |
Sure thing.
Agreed. |
@RyanZim Here is the stack, not much there but maybe something you are looking for.
Again, I just shortened the file paths to lessen the text. |
@kueckermann would you please tell us what OS system and node version you are using? |
@manidlou I am on Windows 10, version 1607. |
Ugh, probably a Windows-only bug. @manidlou Don't bother with what I said about promises earlier, since the bug is in |
|
@kueckermann I've got an idea. Try this: Edit the file |
@RyanZim I added |
OK, that needs to be fixed in our codebase. Also, that patch needs to be forwarded to I'll try to get this done. |
Fixed in v2.1.2 |
The callback is firing twice on my computer when the folder supplied cannot be removed because it is currently accessed by another program.
I have no problem if I use fs.emptyDirSync.
I was running version 2.1.1 of fs-extra.
The text was updated successfully, but these errors were encountered: