src/backup/chunk_store.rs: improve error reporting

This commit is contained in:
Dietmar Maurer 2019-07-04 11:21:54 +02:00
parent a3f3e91da2
commit 9850bcdf19

View File

@ -257,7 +257,7 @@ impl ChunkStore {
// other errors are fatal, so end our iteration // other errors are fatal, so end our iteration
done = true; done = true;
// and pass the error through: // and pass the error through:
return Some((Err(err.into()), percentage)); return Some((Err(format_err!("unable to read subdir '{}' - {}", subdir, err)), percentage));
} }
} }
} }
@ -299,7 +299,7 @@ impl ChunkStore {
let (dirfd, entry) = match entry { let (dirfd, entry) = match entry {
Ok(entry) => (entry.parent_fd(), entry), Ok(entry) => (entry.parent_fd(), entry),
Err(_) => continue, // ignore errors Err(err) => bail!("chunk iterator on chunk store '{}' failed - {}", self.name, err),
}; };
let file_type = match entry.file_type() { let file_type = match entry.file_type() {