From 40f1efa258c16624429d5f7aa073356f96faa55d Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 25 Aug 2016 17:14:09 +0200 Subject: [PATCH] Fix for new StoreId interface in Iterator for Walk impl --- libimagstore/src/store.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index 63cb1a00..edf410a5 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -36,6 +36,7 @@ use hook::position::HookPosition; use hook::Hook; use libimagerror::into::IntoError; +use libimagerror::trace::trace_error; use libimagutil::iter::FoldResult; use self::glob_store_iter::*; @@ -99,7 +100,13 @@ impl Iterator for Walk { return Some(StoreObject::Collection(next.path().to_path_buf())) } else if next.file_type().is_file() { let n = next.path().to_path_buf(); - let sid = StoreId::new(Some(self.store_path.clone()), n); + let sid = match StoreId::new(Some(self.store_path.clone()), n) { + Err(e) => { + trace_error(&e); + continue; + }, + Ok(o) => o, + }; return Some(StoreObject::Id(sid)) }, Err(e) => {