[Bug 197371] tar -X does not allow empty file
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Feb 6 13:18:08 UTC 2015
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197371
Bug ID: 197371
Summary: tar -X does not allow empty file
Product: Base System
Version: 10.1-STABLE
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: bin
Assignee: freebsd-bugs at FreeBSD.org
Reporter: cejkar at fit.vutbr.cz
Created attachment 152617
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=152617&action=edit
archive_match.c.diff
Please see https://code.google.com/p/libarchive/issues/detail?id=401
What steps will reproduce the problem?
1. Create empty file: touch z
2. Run: tar -tf/dev/null -X z
What is the expected output? What do you see instead?
What version are you using?
bsdtar 2.8.5 - libarchive 2.8.5 (as is in FreeBSD 9.3):
$ tar -tf/dev/null -X z
$
... empty output, good
bsdtar 3.1.2 - libarchive 3.1.2 (as is in FreeBSD 10.1):
$ tar -tf/dev/null -X z
tar: Error : Unrecognized archive format
$
Warning: The error is not about /dev/null archive format - it is about empty
file z archive format, so the error is very misleading. File z could not be any
archive in any case. You can try it with real tar file and you will suffer the
same results.
I do not have deep knowledge of libarchive internals and reading of exclude
list seems to be over-complicated to me, so I'm not sure about the correct
solution, but something is included here.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list