[issue4750] tarfile keeps excessive dir structure in compressed files

anatoly techtonik report at bugs.python.org
Mon Dec 29 23:45:53 CET 2008


anatoly techtonik <techtonik at gmail.com> added the comment:

I attach patch for Python 2.6 gzip
I clarified the meaning of self.name to be the basename corresponding to
FNAME field in GZIP file header.

There is a trace of deprecated gzip.filename API - I haven't found any
references to it in documentation, so I removed it. In Python 2.5 it
seemed to mean just filename in read mode and filename + .gz in write
mode even if opened filename did not end with .gz

If FNAME field from gzip header is ignored in read mode, so we want to
make self.filename or self.name available via API - we need to agree
what it should be - basename of archived file or path filename of
archive itself.

Added file: http://bugs.python.org/file12487/4750.gzip.basename.fix.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4750>
_______________________________________


More information about the Python-bugs-list mailing list