Message396382
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 |
|
Date |
User |
Action |
Args |
2021-06-23 06:55:14 | maciej.mm.misiak | set | recipients:
+ maciej.mm.misiak |
2021-06-23 06:55:14 | maciej.mm.misiak | set | messageid: <1624431314.4.0.407283752721.issue44495@roundup.psfhosted.org> |
2021-06-23 06:55:14 | maciej.mm.misiak | link | issue44495 messages |
2021-06-23 06:55:14 | maciej.mm.misiak | create | |
|