Fix StoreId::exists() call with try!()
This commit is contained in:
parent
d3af023166
commit
111943e0eb
1 changed files with 2 additions and 2 deletions
|
@ -552,14 +552,14 @@ impl Store {
|
||||||
pub fn get<'a, S: IntoStoreId + Clone>(&'a self, id: S) -> Result<Option<FileLockEntry<'a>>> {
|
pub fn get<'a, S: IntoStoreId + Clone>(&'a self, id: S) -> Result<Option<FileLockEntry<'a>>> {
|
||||||
let id = try!(id.into_storeid()).with_base(self.path().clone());
|
let id = try!(id.into_storeid()).with_base(self.path().clone());
|
||||||
|
|
||||||
let exists = try!(self.entries
|
let exists = try!(id.exists()) || try!(self.entries
|
||||||
.read()
|
.read()
|
||||||
.map(|map| map.contains_key(&id))
|
.map(|map| map.contains_key(&id))
|
||||||
.map_err(|_| SE::new(SEK::LockPoisoned, None))
|
.map_err(|_| SE::new(SEK::LockPoisoned, None))
|
||||||
.map_err_into(SEK::GetCallError)
|
.map_err_into(SEK::GetCallError)
|
||||||
);
|
);
|
||||||
|
|
||||||
if !exists && !id.exists() {
|
if !exists {
|
||||||
debug!("Does not exist in internal cache or filesystem: {:?}", id);
|
debug!("Does not exist in internal cache or filesystem: {:?}", id);
|
||||||
return Ok(None);
|
return Ok(None);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue