diff --git a/src/sparse.rs b/src/sparse.rs index 20a5b9da..93c50173 100644 --- a/src/sparse.rs +++ b/src/sparse.rs @@ -70,7 +70,8 @@ impl SparseIndex { .cache_path(name) .ok_or_else(|| io::Error::new(io::ErrorKind::InvalidInput, "bad name"))?; - let cache_bytes = std::fs::read(cache_path)?; + let cache_bytes = std::fs::read(&cache_path) + .map_err(|e| io::Error::new(e.kind(), format!("{}: `{}`", e.to_string(), cache_path.display())))?; Ok(Crate::from_cache_slice(&cache_bytes, None)?) }