-
-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make rimraf.sync 10000% more reliable on Windows
By retrying 100 times if we get an ENOTEMPTY removing a dir.
- Loading branch information
Showing
1 changed file
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 comment
on commit d53235d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @isaacs,
Recommend that you test this Windows issue with the following environment:
- With full Defender Real-time protection on.
- Running on a slow HDD (e.g. 5400 RPM used by laptops).
I think these 2 attributes can expose timing issues with the Windows file handles.
I could be wrong, but this continue doesn't do anything except continue with the next loop. What it says right now is: if I didn't do X amount of retries, retry again, with implicit else: retry again (because
while(true)
).This could be fixed by removing the if and changing the loop condition to
i++ < retries
: