From a9647ababd30925dc6c15f330a9158d94556cae5 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Wed, 13 Sep 2017 09:04:24 +0200 Subject: fix HashBlacklistContent.copy It wasn't copying the stored member and thus could be blacklist "wrong" content after a copy. --- dedup/hashing.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'dedup/hashing.py') diff --git a/dedup/hashing.py b/dedup/hashing.py index 2a83929..c91fb64 100644 --- a/dedup/hashing.py +++ b/dedup/hashing.py @@ -80,8 +80,10 @@ class HashBlacklistContent(object): return self.hashobj.hexdigest() def copy(self): - return HashBlacklistContent(self.hashobj.copy(), self.blacklist, - self.maxlen) + new = HashBlacklistContent(self.hashobj.copy(), self.blacklist, + self.maxlen) + new.stored = self.stored + return new class DecompressedHash(object): """Apply a decompression function before the hash. This class provides the -- cgit v1.2.3