From 47f6d9f414288443d9606ebae15bb4d12580b4db Mon Sep 17 00:00:00 2001 From: mwells Date: Sat, 21 Mar 2015 22:42:49 -0600 Subject: [PATCH] clean out rebuild trees/buckets too --- Repair.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Repair.cpp b/Repair.cpp index d1004afaa..aaaaa3336 100644 --- a/Repair.cpp +++ b/Repair.cpp @@ -686,14 +686,26 @@ void Repair::initScan ( ) { // init secondary rdbs - if ( m_rebuildTitledb ) + if ( m_rebuildTitledb ) { if ( ! g_titledb2.init2 ( titledbMem ) ) goto hadError; + // clean tree in case loaded from saved file + Rdb *r = g_titledb2.getRdb(); + if ( r ) r->m_tree.cleanTree(); + } + //if ( m_rebuildTfndb ) // if ( ! g_tfndb2.init2 ( tfndbMem ) ) goto hadError; //if ( m_rebuildIndexdb ) // if ( ! g_indexdb2.init2 ( indexdbMem ) ) goto hadError; - if ( m_rebuildPosdb ) + if ( m_rebuildPosdb ) { if ( ! g_posdb2.init2 ( posdbMem ) ) goto hadError; + // clean tree in case loaded from saved file + Rdb *r = g_posdb2.getRdb(); + if ( r ) r->m_buckets.cleanBuckets(); + } + + + //if ( m_rebuildDatedb ) // if ( ! g_datedb2.init2 ( datedbMem ) ) goto hadError; if ( m_rebuildClusterdb )