dedup

data deduplication program
git clone git://git.2f30.org/dedup.git
Log | Files | Refs | README | LICENSE

commit 28320f9a798150281e7192fe79cc1d48bdf9a4ae
parent 4e65a16a45c87ef2b43c2ce799091b74c475211a
Author: sin <sin@2f30.org>
Date:   Wed, 27 Feb 2019 10:25:43 +0000

Position fd after snaphdr before walking snapshot entries

Diffstat:
Mdedup.c | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

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;