diff options
Diffstat (limited to 'Lib/tarfile.py')
-rw-r--r-- | Lib/tarfile.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py index ed5bcf2..bd73965 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -454,6 +454,8 @@ class _Stream: 0) timestamp = struct.pack("<L", long(time.time())) self.__write("\037\213\010\010%s\002\377" % timestamp) + if type(self.name) is unicode: + self.name = self.name.encode("iso-8859-1", "replace") if self.name.endswith(".gz"): self.name = self.name[:-3] self.__write(self.name + NUL) |