mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
Fix directory names to have only one trailing slash.
A regression from rev. 52525.
This commit is contained in:
parent
9701832161
commit
d220144a84
3 changed files with 19 additions and 1 deletions
|
@ -1842,7 +1842,7 @@ class TarFile(object):
|
|||
tarinfo.type = DIRTYPE
|
||||
|
||||
# Directory names should have a '/' at the end.
|
||||
if tarinfo.isdir():
|
||||
if tarinfo.isdir() and not tarinfo.name.endswith("/"):
|
||||
tarinfo.name += "/"
|
||||
|
||||
self.members.append(tarinfo)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue