Jasper St. Pierre <jstpie...@mecheye.net> added the comment:

Oh man, attaching the wrong diff and getting the diff wrong.

The issue I found with Python 2.7:

when creating a simple link in tar:

$ mkdir tar_test
$ cd tar_test
$ touch one
$ ln -s one two
$ cd ..
$ tar czf tar_test.tgz tar_test

It seems obvious that there would be a relative link in the tar file:

-rwxrwxrwx jstpierre/me 2010-11-02 10:57:15 tar_test/two -> one

Unfortunately, as far as I can tell, tarfile treats this as an absolute path, 
and fails when extracting:

>>> tf.extractfile("tar_test/two")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/tarfile.py", line 2122, in extractfile
    tarinfo))
  File "/usr/lib/python2.6/tarfile.py", line 2105, in extractfile
    if tarinfo.isreg():
AttributeError: 'NoneType' object has no attribute 'isreg'

I was trying to fix that.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10292>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to