dedup

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

commit c908de37593b46facbf6f015dddc4937e979f60d
parent e5bfb58f9fb886201ddae0b0892b39c45ad345ef
Author: sin <sin@2f30.org>
Date:   Wed, 21 Mar 2018 17:40:28 +0000

Forbid 0 sized files

Diffstat:
Mdedup.c | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/dedup.c b/dedup.c @@ -374,9 +374,11 @@ dedup(int fd) } } - /* Calculate hash and add this entry to the index */ - SHA256_Final(ent->md, &ctx); - append_ent(ent); + if (ent->nblks > 0) { + /* Calculate hash and add this entry to the index */ + SHA256_Final(ent->md, &ctx); + append_ent(ent); + } free(ent); flush_cache();