New submission from Joe Tsai:
The original V7 header only allocates 100B to store the file path. If a path
exceeds this length, then either the PAX format or GNU formats must be used,
which can represent arbitrarily long file paths. When doing so, most tar
writers just store the first 100B of
Joe Tsai added the comment:
This bug is not platform specific.
I've attached a reproduction:
$ python
>>> import tarfile
>>> tarfile.open("test.tar", "r").next().isdir()
True
$ tar -tvf test.tar
-rw-rw-r-- 0/0 0 1969-12-31 16:00
123456
Joe Tsai added the comment:
It creates a number of nested directories only because GNU (and BSD) tar
implicitly create missing parent directories. If you cd into the bottom-most
folder, you will see "foo.txt".
--
___
Python track