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:
Matthias Beyer 2019-04-13 23:00:04 +02:00
parent de522ec0f2
commit 526885ee19

View file

@ -176,6 +176,10 @@ impl PathIterBuilder for WalkDirPathIterBuilder {
.min_depth(1)
.max_open(100)
.into_iter()
.filter(|r| match r {
Err(_) => true,
Ok(path) => path.file_type().is_file(),
})
.map(|r| {
trace!("Working in PathIterator with {:?}", r);
r.map(|e| PathBuf::from(e.path()))