New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tarfile.add() produces hard links instead of normal files #42497
Comments
When opening a tarfile for writing and adding several I attach a demo that demonstrates the problem. It tarfile.open('tarfile-bug.tar', 'w')
tar.add('tarfile-bug-f1')
tar.add('tarfile-bug-f2')
tar.close() in the resulting tar, "tarfile-bug-f2" is a hard link It works when the tarfile is close()d and opened again |
Logged In: YES This is a feature ;-) Your problem shows that the way tarfile.py handles hardlinks As a workaround you have several options:
|
Logged In: YES I just submitted patch bpo-1331635 which ought to fix your |
Logged In: YES Martin, I have checked in Lars' patch. If this does not fix Checked in as:
|
Logged In: YES Thanks for the quick reply! Unfortunately, not removing the files after adding them to I'll try your patch now. |
Logged In: YES Confirmed, works perfectly now. Thank you very much! Will |
Logged In: YES It will be fixed in 2.4.3 when released (that's the branch |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: