[ python-Bugs-812325 ] tarfile violates bufsize
SourceForge.net
noreply at sourceforge.net
Fri Jan 2 10:46:09 EST 2004
Bugs item #812325, was opened at 2003-09-25 05:08
Message generated for change (Comment added) made by akuchling
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=812325&group_id=5470
Category: Python Library
>Group: Python 2.4
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Johan Fredrik Öhman (johanfo)
Assigned to: A.M. Kuchling (akuchling)
Summary: tarfile violates bufsize
Initial Comment:
tf = tarfile.open(mode = 'w|gz', fileobj=fileName,
bufsize=20*512)
The following text says how many bytes tarfile writes to
the 'fileName.write' function. Notice that when closing
the tarfile it writes way to many bytes! This happes
just sometimes. Some directories might work, other
might not.
...
write len: 10240
write len: 10240
Closing archive
write len: 24815 # Somthing is wrong?
write len: 4
write len: 4
----------------------------------------------------------------------
>Comment By: A.M. Kuchling (akuchling)
Date: 2004-01-02 10:46
Message:
Logged In: YES
user_id=11375
I've committed my fix as rev. 1.10 of tarfile.py.
----------------------------------------------------------------------
Comment By: A.M. Kuchling (akuchling)
Date: 2003-09-25 14:33
Message:
Logged In: YES
user_id=11375
The close() method just writes the contents of self.buf to the file without
breaking it up into blocks.
Please try the attached patch and let us know if it fixes the problem.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=812325&group_id=5470
More information about the Python-bugs-list
mailing list