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.
This commit is contained in:
Matthias Beyer 2016-09-22 08:29:33 +02:00
parent d5a275fec0
commit caa214f1bd

View file

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