[Zope-Checkins] CVS: Zope/lib/python/ZODB - FileStorage.py:1.67

Jim Fulton jim@zope.com
Tue, 2 Oct 2001 17:48:00 -0400


Update of /cvs-repository/Zope/lib/python/ZODB
In directory cvs.zope.org:/tmp/cvs-serv10689

Modified Files:
	FileStorage.py 
Log Message:
Fixed bug in _abort that could, uh, in really odd cases, cause the
database file not to be truncated when it should have been during a
two-phase commit abort.


=== Zope/lib/python/ZODB/FileStorage.py 1.66 => 1.67 ===
 
     def _abort(self):
-        if self._nextpos: self._file.truncate(self._nextpos)
+        if self._nextpos:
+            self._file.truncate(self._pos)
+            self._nextpos=0
 
     def undo(self, transaction_id):
         self._lock_acquire()