commit | d220144a84b71d4d6a35d68b091a45780c5e5162 | [log] [tgz] |
---|---|---|
author | Lars Gustäbel <lars@gustaebel.de> | Fri Apr 20 14:49:02 2007 +0000 |
committer | Lars Gustäbel <lars@gustaebel.de> | Fri Apr 20 14:49:02 2007 +0000 |
tree | 5128f19fe2f82a94cef8a3bc7b32ffd731019dbb | |
parent | 97018321612c11ba1f795adaed125448d9ff204b [diff] [blame] |
Fix directory names to have only one trailing slash. A regression from rev. 52525.
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 @@ 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)