From caa214f1bdcdf29f20bd818ed997b3f4eada64db Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 22 Sep 2016 08:29:33 +0200 Subject: [PATCH] Fix negation error We check whether the old key already exists. If it does _not_ exist, the entry is borrowed, from my understanding. I'm not sure, though. --- libimagstore/src/store.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libimagstore/src/store.rs b/libimagstore/src/store.rs index 732a2490..68cf3d7a 100644 --- a/libimagstore/src/store.rs +++ b/libimagstore/src/store.rs @@ -667,7 +667,7 @@ impl Store { Ok(m) => m, }; - if hsmap.contains_key(&old_id) { + if !hsmap.contains_key(&old_id) { return Err(SE::new(SEK::EntryAlreadyBorrowed, None)); } else { let old_id_pb = try!(old_id.clone().with_base(self.path().clone()).into_pathbuf());