summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2017-09-13 09:04:24 +0200
committerHelmut Grohne <helmut@subdivi.de>2017-09-13 09:04:24 +0200
commita9647ababd30925dc6c15f330a9158d94556cae5 (patch)
treecdded1ecd1ed4474a6861e54d06e41e9f21375cb
parent5c8e852859b59b6b6bc0d058a5ed89fad55a2f29 (diff)
downloaddebian-dedup-a9647ababd30925dc6c15f330a9158d94556cae5.tar.gz
fix HashBlacklistContent.copy
It wasn't copying the stored member and thus could be blacklist "wrong" content after a copy.
-rw-r--r--dedup/hashing.py6
1 files changed, 4 insertions, 2 deletions
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