diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-05-07 01:59:38 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-06-10 19:40:47 +0300 |
commit | 9afeb648f78ea14849909243c2b54af5e953ee7e (patch) | |
tree | d6bd2d663ba36b25e6fa42a69da04cf06d4b86c6 | |
parent | f1734048c88224302771645fdc009b68fcbf620d (diff) |
melib: keep old_hash in Collection temporarily
When renaming envelopes, keep old_hash in collection until we receive an
EnvelopeRename event in ui
-rw-r--r-- | melib/src/mailbox/backends/maildir.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/melib/src/mailbox/backends/maildir.rs b/melib/src/mailbox/backends/maildir.rs index 6cf11f36..4f7f0e2c 100644 --- a/melib/src/mailbox/backends/maildir.rs +++ b/melib/src/mailbox/backends/maildir.rs @@ -166,7 +166,7 @@ impl<'a> BackendOp for MaildirOp { let hash_index = self.hash_index.clone(); let mut map = hash_index.lock().unwrap(); let map = map.entry(self.folder_hash).or_default(); - map.remove(&old_hash); + map.insert(old_hash, new_name.clone()); map.insert(new_hash, new_name); Ok(()) } |