Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
I would expect both filesA andB to be stored in the tar file. However, onlyA is archived.
# creating the test directory!rm -rf test1.tar test1!mkdir test1!echo thisisa>test1/A!echo thisisb>test1/B
importtarfilearchive=tarfile.open("test1.tar",mode="w",format=tarfile.GNU_FORMAT)archive.addfile(archive.gettarinfo(name="test1/A"))archive.addfile(archive.gettarinfo(name="test1/B"))archive.close()print(tarfile.open("test1.tar",mode="r").getnames())
Expected output:
['test1/A', 'test1/B']Returned output:
['test1/A']Reproduced on these Python versions:
Python 3.11.6 (main, Nov 28 2023, 09:22:32) [Clang 14.0.0 (clang-1400.0.29.202)] on darwinPython 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linuxCPython versions tested on:
3.11
Operating systems tested on:
macOS
Linked PRs
Metadata
Metadata
Assignees
Labels
Projects
Status
Done