Forbid 0 sized files - dedup - deduplicating backup program
HTML git clone git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
DIR commit c908de37593b46facbf6f015dddc4937e979f60d
DIR parent e5bfb58f9fb886201ddae0b0892b39c45ad345ef
HTML Author: sin <sin@2f30.org>
Date: Wed, 21 Mar 2018 17:40:28 +0000
Forbid 0 sized files
Diffstat:
M dedup.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
DIR 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();