diff options
author | Andrew Gallant <jamslam@gmail.com> | 2020-02-17 15:59:03 -0500 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2020-02-17 17:16:28 -0500 |
commit | 52d7f474206eb517c7284448777ed839c0cae8bb (patch) | |
tree | 27a3896de5ad5b648984be5e4e3beb57ccda44d4 /CHANGELOG.md | |
parent | 75cbe88fa2993bcb12cbbddb32670cba30527716 (diff) |
ignore: treat symbolic links to directories as directories
Due to how walkdir works if symlinks are not followed, symlinks to
directories are seen as simple files by ripgrep. This caused a panic
in some cases due to receiving a WalkEvent::Exit event without a
corresponding WalkEvent::Dir event.
This is fixed by looking at the metadata of the file in the case of a
symlink to determine if it's a directory. We are careful to only do
this stat check when the depth of the entry is 0, as this bug only
impacts us when 1) we aren't following symlinks generally and 2) the
user provides a symlinked directory that we do follow as a top-level
path to search.
Fixes #1389, Closes #1397
Diffstat (limited to 'CHANGELOG.md')
-rw-r--r-- | CHANGELOG.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 30736139..13aadf7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,8 @@ Bug fixes: This was a serious performance regression in some cases. * [BUG #1344](https://github.com/BurntSushi/ripgrep/issues/1344): Document usage of `--type all`. +* [BUG #1389](https://github.com/BurntSushi/ripgrep/issues/1389): + Fixes a bug where ripgrep would panic when searching a symlinked directory. * [BUG #1445](https://github.com/BurntSushi/ripgrep/issues/1445): ripgrep now respects ignore rules from .git/info/exclude in worktrees. * [BUG #1485](https://github.com/BurntSushi/ripgrep/issues/1485): |