[issue44495] wrong FNAME in tarfile if tgz extension is used

2022-01-16 Thread Irit Katriel
Change by Irit Katriel : -- type: -> behavior versions: -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___ ___

[issue44495] wrong FNAME in tarfile if tgz extension is used

2021-11-01 Thread Rob Nelson
Rob Nelson added the comment: The code referenced in the previous comment only hits for tarfiles built from Streams. The same (incorrect) code exists in the gzip.py library as well, and hits the more common usecase of building a tar.gz from a set of files on disk. def

[issue44495] wrong FNAME in tarfile if tgz extension is used

2021-06-23 Thread Maciej Misiak
New submission from Maciej Misiak : 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