mirror of
https://github.com/python/cpython.git
synced 2025-08-19 00:00:48 +00:00
Bug #1704156: Support for unicode strings as input filenames is
neither documented nor intended but works in Python 2.4 under certain conditions. This stopped working in 2.5 because struct.pack is used. This small patch restores the old behaviour. A more solid solution is planned for 2.6.
This commit is contained in:
parent
93a3603c67
commit
8ff1f6a69e
1 changed files with 1 additions and 1 deletions
|
@ -963,7 +963,7 @@ class TarInfo(object):
|
|||
stn(prefix, 155)
|
||||
]
|
||||
|
||||
buf += struct.pack("%ds" % BLOCKSIZE, "".join(parts))
|
||||
buf += "".join(parts).ljust(BLOCKSIZE, NUL)
|
||||
chksum = calc_chksums(buf[-BLOCKSIZE:])[0]
|
||||
buf = buf[:-364] + "%06o\0" % chksum + buf[-357:]
|
||||
self.buf = buf
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue