Commit edbbc85d authored by Andreas Zeidler's avatar Andreas Zeidler

Follow-up to r91064 to also allow deep-copied blobs to be opened (also see...

Follow-up to r91064 to also allow deep-copied blobs to be opened (also see http://mail.zope.org/pipermail/zodb-dev/2008-August/012054.html).
parent bf027890
...@@ -4,6 +4,8 @@ Whats new in ZODB 3.8.1 ...@@ -4,6 +4,8 @@ Whats new in ZODB 3.8.1
Bugs Fixed: Bugs Fixed:
- (beta 9) Fixed a bug to allow opening of deep-copied blobs.
- (beta 9) Fixed bug #189542 by prepending the module to an undefined name. - (beta 9) Fixed bug #189542 by prepending the module to an undefined name.
- (beta 8) If there is a failure while FileStorage is finalizing a transaction, - (beta 8) If there is a failure while FileStorage is finalizing a transaction,
......
...@@ -125,6 +125,9 @@ class Blob(persistent.Persistent): ...@@ -125,6 +125,9 @@ class Blob(persistent.Persistent):
if self.writers: if self.writers:
raise BlobError("Already opened for writing.") raise BlobError("Already opened for writing.")
if self.readers is None:
self.readers = []
if mode == 'r': if mode == 'r':
if self._current_filename() is None: if self._current_filename() is None:
self._create_uncommitted_file() self._create_uncommitted_file()
......
...@@ -140,6 +140,10 @@ class BlobCloneTests(BlobTests): ...@@ -140,6 +140,10 @@ class BlobCloneTests(BlobTests):
clone = u.load() clone = u.load()
clone._p_invalidate() clone._p_invalidate()
# it should also be possible to open the cloned blob
# (even though it won't contain the original data)
clone.open()
class BlobUndoTests(BlobTests): class BlobUndoTests(BlobTests):
......
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