summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-04-13 23:42:20 +0200
committerMatthias Beyer <mail@beyermatthias.de>2019-04-13 23:42:20 +0200
commit0283c3af7a0d15b4b0b79c01d65c2827b0936515 (patch)
treed7e66be9826feb1204215784ed08a230ad8bb4c8
parenta4bcefe660468f740bf9a455c97b8be8e6cda0cc (diff)
parent526885ee191e8891755ec0b4089bdf52c66933bd (diff)
downloadimag-0283c3af7a0d15b4b0b79c01d65c2827b0936515.zip
imag-0283c3af7a0d15b4b0b79c01d65c2827b0936515.tar.gz
Merge branch 'fix-path-iterator' into master-ff
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--lib/core/libimagstore/src/file_abstraction/fs.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/core/libimagstore/src/file_abstraction/fs.rs b/lib/core/libimagstore/src/file_abstraction/fs.rs
index 9877474..904e81d 100644
--- a/lib/core/libimagstore/src/file_abstraction/fs.rs
+++ b/lib/core/libimagstore/src/file_abstraction/fs.rs
@@ -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()))