From 813c105da9f8b71453dacc04d51e920ce30d64c6 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Tue, 4 Jun 2013 23:24:50 +0200 Subject: [PATCH] In dup don't list empty files. --- HISTORY | 1 + dup.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY b/HISTORY index 3543ca15..09fe1a89 100644 --- a/HISTORY +++ b/HISTORY @@ -11,6 +11,7 @@ SnapRAID HISTORY * In Windows applies filters in case insensitive way. * The Windows binaries are now built with gcc 4.7.2. * Reduced memory occupation for hardlinks and directories. + * In 'dup' don't list file with 0 size. 3.0 2013/3 ========== diff --git a/dup.c b/dup.c index 0271b594..e574993e 100644 --- a/dup.c +++ b/dup.c @@ -110,7 +110,11 @@ void state_dup(struct snapraid_state* state) /* if no hash, skip it */ if (!hash) continue; - + + /* if empty, skip it */ + if (!file->size == 0) + continue; + hash32 = hash_hash(hash); struct snapraid_hash* dup = tommy_hashdyn_search(&hashset, hash_compare, hash->hash, hash32);