mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-06-25 14:22:54 +02:00
Merge pull request #157 from CannedYerins/follow-explicit-args
Always follow symlinks on explicit file arguments
This commit is contained in:
@ -708,7 +708,9 @@ impl Args {
|
||||
|
||||
/// Create a new recursive directory iterator at the path given.
|
||||
pub fn walker(&self, path: &Path) -> Result<walk::Iter> {
|
||||
let mut wd = WalkDir::new(path).follow_links(self.follow);
|
||||
// Always follow symlinks for explicitly specified files.
|
||||
let mut wd = WalkDir::new(path).follow_links(self.follow
|
||||
|| path.is_file());
|
||||
if let Some(maxdepth) = self.maxdepth {
|
||||
wd = wd.max_depth(maxdepth);
|
||||
}
|
||||
|
Reference in New Issue
Block a user