Kaydet (Commit) 6bf51da9 authored tarafından Lars Gustäbel's avatar Lars Gustäbel

Make sure that xstar headers are read correctly.

üst 31f6bc01
...@@ -208,6 +208,15 @@ class MiscReadTest(ReadTest): ...@@ -208,6 +208,15 @@ class MiscReadTest(ReadTest):
self.assert_(tarinfo.type == tarfile.DIRTYPE, self.assert_(tarinfo.type == tarfile.DIRTYPE,
"v7 dirtype failed") "v7 dirtype failed")
def test_xstar_type(self):
# The xstar format stores extra atime and ctime fields inside the
# space reserved for the prefix field. The prefix field must be
# ignored in this case, otherwise it will mess up the name.
try:
self.tar.getmember("misc/regtype-xstar")
except KeyError:
self.fail("failed to find misc/regtype-xstar (mangled prefix?)")
def test_check_members(self): def test_check_members(self):
for tarinfo in self.tar: for tarinfo in self.tar:
self.assert_(int(tarinfo.mtime) == 07606136617, self.assert_(int(tarinfo.mtime) == 07606136617,
......
This diff was suppressed by a .gitattributes entry.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment