Issue 812325: tarfile violates bufsize (original) (raw)

Issue812325

Created on 2003-09-25 09:08 by johanfo, last changed 2022-04-10 16:11 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
tarfile.patch akuchling,2003-09-25 18:33 Add self.__write() call
Messages (3)
msg18350 - (view) Author: Johan Fredrik Öhman (johanfo) Date: 2003-09-25 09:08
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
msg18351 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2003-09-25 18:33
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.
msg18352 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2004-01-02 15:46
Logged In: YES user_id=11375 I've committed my fix as rev. 1.10 of tarfile.py.
History
Date User Action Args
2022-04-10 16:11:22 admin set github: 39297
2003-09-25 09:08:11 johanfo create