Skip to content
Myr

Revert "Use IgnoreDuplicateDirs to prevent duplicate directory traversal"

Before adoption: this commit came in with the history the project adopted, so no landing records it.

This reverts commit 6f33df755ed8ace0fe078827ba12298af73c72cc.

authored by Junegunn Choi · committed by Junegunn Choi · parent 6f33df7 · Browse files · 2 files+2 added−9 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+2 added−9 removed

  • other:+2 added−9 removed

2 files+2 added−9 removed

modified:src/reader.go+2 added-8 removed
267 unmodified lines
268}269270func (r *Reader) readFiles(roots []string, opts walkerOpts, ignores []string) bool {271 conf := fastwalk.Config{272 // When opts.follow is true, symlink following and loop/duplicate273 // detection is handled by IgnoreDuplicateDirs below.274 Follow: false,272 Follow: opts.follow,273 // Use forward slashes when running a Windows binary under WSL or MSYS274 ToSlash: fastwalk.DefaultToSlash(),275 Sort: fastwalk.SortFilesFirst,276 }
61 unmodified lines
338 return context.Canceled339 }340 return nil341 }344 var walkFn fs.WalkDirFunc = fn345 if opts.follow {346 walkFn = fastwalk.IgnoreDuplicateDirs(fn)347 }342 noerr := true343 for _, root := range roots {350 noerr = noerr && (fastwalk.Walk(&conf, root, walkFn) == nil)344 noerr = noerr && (fastwalk.Walk(&conf, root, fn) == nil)345 }346 return noerr347}348
29 unmodified lines
modified:CHANGELOG.md-1 removed
25 unmodified lines
26 - Improved the cache structure, reducing memory footprint per entry by 86x.27 - With the reduced per-entry cost, the cache now has broader coverage.28- fish: Improved command history (CTRL-R) (#4703) (@bitraid)29- Bug fixes30 - `--walker=follow` no longer visits the same directory more than once. This avoids effectively infinite traversal when a symlink points outside the walker root (#4710)30 - Fixed AWK tokenizer not treating a new line character as whitespace31 - Fixed `--{accept,with}-nth` removing trailing whitespaces with a non-default `--delimiter`32 - Fixed OSC8 hyperlinks being mangled when the URL contains unicode characters (#4707)33 - Fixed `--with-shell` not handling quoted arguments correctly (#4709)
3207 unmodified lines