diff options
-rw-r--r-- | lib/core/libimagstore/src/file_abstraction/inmemory.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/core/libimagstore/src/file_abstraction/inmemory.rs b/lib/core/libimagstore/src/file_abstraction/inmemory.rs index a499b697..d5e89ac7 100644 --- a/lib/core/libimagstore/src/file_abstraction/inmemory.rs +++ b/lib/core/libimagstore/src/file_abstraction/inmemory.rs @@ -140,7 +140,7 @@ impl FileAbstraction for InMemoryFileAbstraction { let mut mtx = self.backend().lock().expect("Locking Mutex failed"); let backend = mtx.get_mut(); - let a = backend.get(from).cloned().ok_or_else(|| EM::FileNotFound)?; + let a = backend.remove(from).ok_or_else(|| EM::FileNotFound)?; backend.insert(to.clone(), a); debug!("Renaming: {:?} -> {:?} worked", from, to); Ok(()) |