summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-10-07 15:08:25 +0200
committerMatthias Beyer <mail@beyermatthias.de>2018-11-06 14:48:49 +0100
commite91943550449efeb781aa7ba327e98c9a94f49df (patch)
treed25b91643ca352e0eb907b2a20aaf0d75f69de88
parentcb0fcaffdece53265063272c5d59c10d83bb569e (diff)
downloadimag-e91943550449efeb781aa7ba327e98c9a94f49df.zip
imag-e91943550449efeb781aa7ba327e98c9a94f49df.tar.gz
Fix: Remove call to deprecated function
-rw-r--r--lib/core/libimagstore/src/store.rs24
1 files changed, 14 insertions, 10 deletions
diff --git a/lib/core/libimagstore/src/store.rs b/lib/core/libimagstore/src/store.rs
index 64ab7fc..8eac76d 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);