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
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.