Fix: Remove call to deprecated function

This commit is contained in:
Matthias Beyer 2018-10-07 15:08:25 +02:00
parent cb0fcaffde
commit e919435504
1 changed files with 14 additions and 10 deletions

View File

@ -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);