[Bug 12291] tar command fails when specifying directory to untar if specific thing from directory was added (not the directory itself)

bugzilla at busybox.net bugzilla at busybox.net
Thu Apr 14 15:16:17 UTC 2022


https://bugs.busybox.net/show_bug.cgi?id=12291

--- Comment #3 from Devid Antonio Filoni <devid.filoni at egluetechnologies.com> ---
To create a tarball that reproduces the issue you can use the following
commands:

~# cd /tmp/
/tmp# mkdir test
/tmp# touch test/a
/tmp# tar zcvf test.tar.gz test/a
test/a
/tmp# mkdir test2

/tmp# tar zxvf test.tar.gz -C test2/ test
test/a
tar: test: not found in archive



The tar works fine if it is created with the following command:

/tmp# tar zcvf test.tar.gz test
test/
test/a



In attaching a patch (based on busybox v1.31.1) that seems to fix the issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list