diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2018-10-07 15:08:25 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2018-11-06 14:48:49 +0100 |
commit | e91943550449efeb781aa7ba327e98c9a94f49df (patch) | |
tree | d25b91643ca352e0eb907b2a20aaf0d75f69de88 /lib/core | |
parent | cb0fcaffdece53265063272c5d59c10d83bb569e (diff) |
Fix: Remove call to deprecated function
Diffstat (limited to 'lib/core')
-rw-r--r-- | lib/core/libimagstore/src/store.rs | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/lib/core/libimagstore/src/store.rs b/lib/core/libimagstore/src/store.rs index 64ab7fc4..8eac76d9 100644 --- a/lib/core/libimagstore/src/store.rs +++ b/lib/core/libimagstore/src/store.rs @@ -222,11 +222,13 @@ impl Store { debug!("Creating id: '{}'", id); - let exists = id.exists()? || self.entries - .read() - .map(|map| map.contains_key(&id)) - .map_err(|_| Error::from(EM::LockError)) - .context(format_err!("CreateCallError: {}", id))?; + let exists = + self.backend.exists(&id.clone().into_pathbuf()?)? || + self.entries + .read() + .map(|map| map.contains_key(&id)) + .map_err(|_| Error::from(EM::LockError)) + .context(format_err!("CreateCallError: {}", id))?; if exists { debug!("Entry exists: {:?}", id); @@ -304,11 +306,13 @@ impl Store { debug!("Getting id: '{}'", id); - let exists = id.exists()? || self.entries - .read() - .map(|map| map.contains_key(&id)) - .map_err(|_| Error::from(EM::LockError)) - .context(format_err!("GetCallError: {}", id))?; + let exists = + self.backend.exists(&id.clone().into_pathbuf()?)? || + self.entries + .read() + .map(|map| map.contains_key(&id)) + .map_err(|_| Error::from(EM::LockError)) + .context(format_err!("CreateCallError: {}", id))?; if !exists { debug!("Does not exist in internal cache or filesystem: {:?}", id); |