Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid race condition crash on directory deletion
Given the directory structure /a/b/c.txt there is a race condition in DirectorySnapshot if it reads the list of entries in /a, then /a/b is deleted, and then it tries to read /a/b. This happens often in practice when changing between very different branches in git. The ideal behaviour would be to report /a/b as not existing in this case, but we cannot do this without either changing the order of the walk (from parent-first to parent-last) or significantly increasing memory usage and copies, so instead we report /a/b as existing but empty.
- Loading branch information