Skip to content

Commit 063fbdc

Browse files
committed
Improve debug message
1 parent 91b6083 commit 063fbdc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sparse.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ impl SparseIndex {
7070
.cache_path(name)
7171
.ok_or_else(|| io::Error::new(io::ErrorKind::InvalidInput, "bad name"))?;
7272

73-
let cache_bytes = std::fs::read(cache_path)?;
73+
let cache_bytes = std::fs::read(&cache_path)
74+
.map_err(|e| io::Error::new(e.kind(), format!("{}: `{}`", cache_path.display(), e.to_string())))?;
7475
Ok(Crate::from_cache_slice(&cache_bytes, None)?)
7576
}
7677

0 commit comments

Comments
 (0)