[issue1531] tarfile.open(fileobj=f) and bad metadata of the first file within the archive

2007-12-01 Thread George Notaras
George Notaras added the comment: Thanks for the quick fix and the workaround. You are right about position 756. I hadn't spent enough time studying the ''ustar'' format. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1531

[issue1529] Error when passing a file object to tarfile.open()

2007-11-30 Thread George Notaras
George Notaras added the comment: Indeed, I have downloaded the latest tarfile module from svn and it works as expected. I should have done this in the first place. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1529

[issue1531] tarfile.open(fileobj=f) and bad metadata of the first file within the archive

2007-11-30 Thread George Notaras
New submission from George Notaras: Assume the following situation: - a healthy and uncompressed tar file: a.tar - the metadata of the 1st and second files within the archive start at positions 0 and 756 (realistic example values) I partially damage 200 bytes of metadata (byte range 0-500

[issue1529] Error when passing a file object to tarfile.open()

2007-11-30 Thread George Notaras
New submission from George Notaras: Assume a healthy uncompressed tar file: a.tar When trying to open the tarfile using a fileobject, there is always an exception: f_raw = open(a.tar, rb) import tarfile f_tar = tarfile.open(mode=r:, fileobj=f_raw) Traceback (most recent call last): File