Fixed index inconsistency when removing gone bundle

This commit is contained in:
Dennis Schwerdel 2017-03-30 16:44:40 +02:00 committed by Dennis Schwerdel
parent d5b033c85a
commit df2f407d96
1 changed files with 1 additions and 0 deletions

View File

@ -228,6 +228,7 @@ impl Repository {
fn remove_gone_remote_bundle(&mut self, bundle: BundleInfo) -> Result<(), RepositoryError> {
if let Some(id) = self.bundle_map.find(&bundle.id) {
info!("Removing bundle from index: {}", bundle.id);
try!(self.index.filter(|_key, data| data.bundle != id));
self.bundle_map.remove(id);
}
Ok(())