Fix for new StoreId interface in Iterator for Walk impl

This commit is contained in:
Matthias Beyer 2016-08-25 17:14:09 +02:00
parent a110ecc2ec
commit 40f1efa258

View file

@ -36,6 +36,7 @@ use hook::position::HookPosition;
use hook::Hook; use hook::Hook;
use libimagerror::into::IntoError; use libimagerror::into::IntoError;
use libimagerror::trace::trace_error;
use libimagutil::iter::FoldResult; use libimagutil::iter::FoldResult;
use self::glob_store_iter::*; use self::glob_store_iter::*;
@ -99,7 +100,13 @@ impl Iterator for Walk {
return Some(StoreObject::Collection(next.path().to_path_buf())) return Some(StoreObject::Collection(next.path().to_path_buf()))
} else if next.file_type().is_file() { } else if next.file_type().is_file() {
let n = next.path().to_path_buf(); 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)) return Some(StoreObject::Id(sid))
}, },
Err(e) => { Err(e) => {