Fix: PathIterBuilder should not yield directories
PathIterBuilder should yield iterator that does only yield file pathes, not directories. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
de522ec0f2
commit
526885ee19
1 changed files with 4 additions and 0 deletions
|
@ -176,6 +176,10 @@ impl PathIterBuilder for WalkDirPathIterBuilder {
|
||||||
.min_depth(1)
|
.min_depth(1)
|
||||||
.max_open(100)
|
.max_open(100)
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
.filter(|r| match r {
|
||||||
|
Err(_) => true,
|
||||||
|
Ok(path) => path.file_type().is_file(),
|
||||||
|
})
|
||||||
.map(|r| {
|
.map(|r| {
|
||||||
trace!("Working in PathIterator with {:?}", r);
|
trace!("Working in PathIterator with {:?}", r);
|
||||||
r.map(|e| PathBuf::from(e.path()))
|
r.map(|e| PathBuf::from(e.path()))
|
||||||
|
|
Loading…
Reference in a new issue