Fix recursive FilePathWatcher on Linux when touching a directory
FilePathWatcher is DCHECKing when touching a directory for a recursive directory, this is due to invariant being broken between members: |recursive_paths_by_watch_| and |recursive_watches_by_path_|. Function UpdateRecursiveWatches() was erasing from |recursive_watches_by_path_|, but wasn't erasing from |recursive_paths_by_watch_|. This CL fixes UpdateRecursiveWatches() to maintain the invariant, by erasing from |recursive_paths_by_watch_| too. Test: base_unittests --gtest_filter="*RecursiveWatch*" Bug: 995196 Change-Id: Ibcc8b015d7d9b68d2eff59f4ae9e87d84d76991f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1757960Reviewed-by:Lei Zhang <thestig@chromium.org> Commit-Queue: Luciano Pacheco <lucmult@chromium.org> Auto-Submit: Luciano Pacheco <lucmult@chromium.org> Cr-Commit-Position: refs/heads/master@{#688430}
Showing
Please register or sign in to comment