From ddd32effba2961007e2ecab0abc058ab00836c3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Borgstr=C3=B6m?= Date: Sun, 18 Apr 2010 22:51:54 +0200 Subject: [PATCH] Fixed a chunk refcounting bug --- dedupestore/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dedupestore/cache.py b/dedupestore/cache.py index f425d33af..4b91e7892 100644 --- a/dedupestore/cache.py +++ b/dedupestore/cache.py @@ -82,7 +82,7 @@ class Cache(object): def init_chunk(self, id, sum, csize, osize): self.chunkmap[id] = (1, sum, osize, csize) - self.summap.setdefault(sum, 1) + self.summap[sum] = self.summap.get(sum, 0) + 1 return id, sum, csize, osize def seen_chunk(self, id):