From: cvs Date: Mon, 5 May 2003 04:20:14 +0000 (+0000) Subject: digest: Fix incorrect statistics when hashes fail X-Git-Tag: dm6-0.20100514~39 X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=dupemerge;a=commitdiff_plain;h=77a91221531d6e674b0c6e3c53ca742b51dafc1d;hp=aa42755213d1f38be21a9446de9cfe1b4c011410 digest: Fix incorrect statistics when hashes fail An order-of-operations bug can lead to files being counted as hashed when they are not (e.g. due to I/O error or the file disappearing). Calculate the digest, then increment the statistics. git-svn-id: svn+ssh://svn.furryterror.org/r/trunk/mokona/zblaxell@3332 a5e33b96-951a-0410-ae88-c0fe16d076bb --- diff --git a/faster-dupemerge b/faster-dupemerge index a007540..b7554de 100755 --- a/faster-dupemerge +++ b/faster-dupemerge @@ -90,9 +90,10 @@ sub digest { if ($skip_hashes) { return "SKIPPING HASHES"; } else { - &really_digest($filename); + my $digest = &really_digest($filename); $hash_bytes += -s $filename; $hash_files++; + return $digest } }