tRebuild cache if there is a mismatch between # of entries and # of blocks - dedup - deduplicating backup program
 (HTM) git clone git://git.z3bra.org/dedup.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 13b57d93ac080996a2857ef0be4b367834447786
 (DIR) parent de5d80e928daf2f67a8151796a5f9ca4ac4663e2
 (HTM) Author: sin <sin@2f30.org>
       Date:   Tue,  5 Mar 2019 11:25:16 +0000
       
       Rebuild cache if there is a mismatch between # of entries and # of blocks
       
       Diffstat:
         M dedup.c                             |       4 +++-
       
       1 file changed, 3 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/dedup.c b/dedup.c
       t@@ -550,7 +550,9 @@ load_cache(void)
        
                xlseek(cfd, 0, SEEK_SET);
                nr_entries = cache_nr_entries();
       -        if (nr_entries == 0) {
       +        if (nr_entries != snap_hdr.st.nr_blks) {
       +                if (verbose > 0)
       +                        fprintf(stderr, "Rebuilding cache\n");
                        xlseek(ifd, SNAP_HDR_SIZE, SEEK_SET);
                        walk_snap(reload_cache, NULL);
                        return;