A regression from rev. 52525.
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)
except:
pass
+ def test_dirtype(self):
+ for tarinfo in self.tar:
+ if tarinfo.isdir():
+ self.assert_(tarinfo.name.endswith("/"))
+ self.assert_(not tarinfo.name[:-1].endswith("/"))
+
+
class ReadStreamTest(ReadTest):
sep = "|"
(editors: check NEWS.help for information about editing NEWS using ReST.)
+What's New in Python 2.5.2c1?
+=============================
+
+*Release date: XX-XXX-XXXX*
+
+Library
+-------
+
+- tarfile.py: Fix directory names to have only one trailing slash.
+
+
What's New in Python 2.5.1?
=============================