Commit 41391ce3 authored by Andreas Jung's avatar Andreas Jung

parent d1631cf2
...@@ -271,7 +271,9 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage): ...@@ -271,7 +271,9 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage):
while roids: while roids:
roid = roids.pop(0) roid = roids.pop(0)
# decrement refcnt: # decrement refcnt:
rc=referenceCount_get(roid, 0) # DM 2005-01-07: decrement *before* you make the test!
# rc=referenceCount_get(roid, 0)
rc=referenceCount_get(roid, 0) - 1
if rc==0: if rc==0:
self._takeOutGarbage(roid) self._takeOutGarbage(roid)
elif rc < 0: elif rc < 0:
...@@ -280,7 +282,9 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage): ...@@ -280,7 +282,9 @@ class TemporaryStorage(BaseStorage, ConflictResolvingStorage):
(ReferenceCountError.__doc__,`roid`,rc) (ReferenceCountError.__doc__,`roid`,rc)
) )
else: else:
referenceCount[roid] = rc - 1 # DM 2005-01-07: decremented *before* the test! see above
#referenceCount[roid] = rc - 1
referenceCount[roid] = rc
try: del self._oreferences[oid] try: del self._oreferences[oid]
except: pass except: pass
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment