forked from mirrors/jj
simple_op_store: return NotFound
for missing views
I guess we don't depend on `read_view()` ever returning `NotFound` the way `read_operation()` does, but it seems like it still should return `NotFound` when the view doesn't exist.
This commit is contained in:
parent
84a60d15bc
commit
96e75e6ad1
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ impl OpStore for SimpleOpStore {
|
|||
|
||||
fn read_view(&self, id: &ViewId) -> OpStoreResult<View> {
|
||||
let path = self.view_path(id);
|
||||
let buf = fs::read(path)?;
|
||||
let buf = fs::read(path).map_err(not_found_to_store_error)?;
|
||||
|
||||
let proto = crate::protos::op_store::View::decode(&*buf)?;
|
||||
Ok(view_from_proto(proto))
|
||||
|
|
Loading…
Reference in a new issue