This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author maciej.mm.misiak
Recipients maciej.mm.misiak
Date 2021-06-23.06:55:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1624431314.4.0.407283752721.issue44495@roundup.psfhosted.org>
In-reply-to
Content
This code is incomplete:

def _init_write_gz(self):
...
    if self.name.endswith(".gz"):
        self.name = self.name[:-3]
    # RFC1952 says we must use ISO-8859-1 for the FNAME field.
    self.__write(self.name.encode("iso-8859-1", "replace") + NUL)

If it is used in following way '.gz' is stripped properly and FNAME='somefile.tar':
    tarfile.open('somefile.tar.gz', 'w:gz')
but with 
    tarfile.open('somefile.tgz', 'w:gz')

FNAME is incorrectly prepared as somefile.tgz
History
Date User Action Args
2021-06-23 06:55:14maciej.mm.misiaksetrecipients: + maciej.mm.misiak
2021-06-23 06:55:14maciej.mm.misiaksetmessageid: <1624431314.4.0.407283752721.issue44495@roundup.psfhosted.org>
2021-06-23 06:55:14maciej.mm.misiaklinkissue44495 messages
2021-06-23 06:55:14maciej.mm.misiakcreate