Position fd after snaphdr before walking snapshot entries - dedup - deduplicating backup program
 (HTM) git clone git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Tags
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 28320f9a798150281e7192fe79cc1d48bdf9a4ae
 (DIR) parent 4e65a16a45c87ef2b43c2ce799091b74c475211a
 (HTM) Author: sin <sin@2f30.org>
       Date:   Wed, 27 Feb 2019 10:25:43 +0000
       
       Position fd after snaphdr before walking snapshot entries
       
       Diffstat:
         M dedup.c                             |       4 ++++
       
       1 file changed, 4 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/dedup.c b/dedup.c
       @@ -440,6 +440,7 @@ load_cache(void)
        
                nr_entries = sb.st_size / CACHE_ENTRY_LEN;
                if (nr_entries == 0) {
       +                xlseek(ifd, SNAPHDR_LEN, SEEK_SET);
                        walk_snap(rebuild_cache, NULL);
                        return;
                }
       @@ -587,12 +588,14 @@ main(int argc, char *argv[])
                init();
        
                if (cflag) {
       +                xlseek(ifd, SNAPHDR_LEN, SEEK_SET);
                        walk_snap(check, NULL);
                        term();
                        return 0;
                }
        
                if (lflag) {
       +                xlseek(ifd, SNAPHDR_LEN, SEEK_SET);
                        walk_snap(list, NULL);
                        term();
                        return 0;
       @@ -601,6 +604,7 @@ main(int argc, char *argv[])
                if (id) {
                        struct extract_args args;
        
       +                xlseek(ifd, SNAPHDR_LEN, SEEK_SET);
                        str2bin(id, md);
                        args.md = md;
                        args.fd = fd;