Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
traversal: more robust error handling
This fixes a bug in walkdir that happened on Windows when following symlinks. It was triggered when opening a handle to the symlink failed. In particular, this resulted in the two stacks in the walkdir iterator getting out of sync. At some point, this tripped a panic when popping from one stack would be fine but popping from the other failed because it was empty. We fix this by only pushing to both stacks if and only if both pushes would succeed. This bug was found via ripgrep. See: BurntSushi/ripgrep#633 (comment)
- Loading branch information