diff options
author | Lars Gustäbel <lars@gustaebel.de> | 2007-04-20 14:49:02 (GMT) |
---|---|---|
committer | Lars Gustäbel <lars@gustaebel.de> | 2007-04-20 14:49:02 (GMT) |
commit | d220144a84b71d4d6a35d68b091a45780c5e5162 (patch) | |
tree | 5128f19fe2f82a94cef8a3bc7b32ffd731019dbb /Lib/tarfile.py | |
parent | 97018321612c11ba1f795adaed125448d9ff204b (diff) | |
download | cpython-d220144a84b71d4d6a35d68b091a45780c5e5162.zip cpython-d220144a84b71d4d6a35d68b091a45780c5e5162.tar.gz cpython-d220144a84b71d4d6a35d68b091a45780c5e5162.tar.bz2 |
Fix directory names to have only one trailing slash.
A regression from rev. 52525.
Diffstat (limited to 'Lib/tarfile.py')
-rw-r--r-- | Lib/tarfile.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py index 4c7dadb..261d9fb 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -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) |