Catherine Devlin added the comment: I apologize, I retract my earlier comment - I believe both Yaroslav and I were confused about the nature of the problem. I think it's not related to permissions at all, but to adding a file to the tarfile twice.
To see this, use `tarfilero.py` as provided by Yaroslav, but comment out the `tar.add('sample/rodir/file')` line (line 16) and run it - everything works normally, and the `rodir/file` is present. It appears that adding the directory to the tarfile also adds the file within the directory, and adding the file individually creates a second reference to the file. When expanding, `tarfile` attempts to create the file twice, and the second attempt fails because a file by that name already exists. I still think this is a bug - perhaps re-adding a file already present in a tarfile should throw an error, or silently do nothing without adding a second reference to the file, or at least the error message when trying to expand a file into a path that is blocked by a file already present should give a more informative error. I will look for existing tickets along those lines. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30438> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com