Add debug output to Walk::next() impl
This commit is contained in:
parent
54484a6ee7
commit
cac3e6114e
1 changed files with 17 additions and 12 deletions
|
@ -105,14 +105,19 @@ impl Iterator for Walk {
|
|||
type Item = StoreObject;
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
|
||||
while let Some(something) = self.dirwalker.next() {
|
||||
debug!("[Walk] Processing next item: {:?}", something);
|
||||
match something {
|
||||
Ok(next) => if next.file_type().is_dir() {
|
||||
debug!("Found directory...");
|
||||
return Some(StoreObject::Collection(next.path().to_path_buf()))
|
||||
} else if next.file_type().is_file() {
|
||||
} else /* if next.file_type().is_file() */ {
|
||||
debug!("Found file...");
|
||||
let n = next.path().to_path_buf();
|
||||
let sid = match StoreId::new(Some(self.store_path.clone()), n) {
|
||||
Err(e) => {
|
||||
debug!("Could not construct StoreId object from it");
|
||||
trace_error(&e);
|
||||
continue;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue