On Tue, 21 Oct 2014, Cristian Ionescu-Idbohrn wrote:
> On Tue, 21 Oct 2014, Mike Frysinger wrote:
> > On 20 Oct 2014 20:54, Cristian Ionescu-Idbohrn wrote:
> > > That deserves a patch in http://busybox.net/downloads/fixes-1.22.1/,
> > > IMO.  At least, commits:
> > >
> > >   7c47b560a8fc97956dd8132bd7f1863d83c19866
> > >   b664f740d90880560ce46b11f766625341342e80
> > >   640ce3de07807133796bccd0bdfa146bbfc788c7
> > >
> > > may be relevantat.
> >
> > what exactly are you calling "the zcat bug" ?  seems to me only the
> > first one should be backported.  `busybox zcat foo` failing when foo
> > is not compressed matches standard `zcat` behavior. -mike
>
> Well, but it fails (but returns exit status success) even if the file
> is compressed (ex. gzipped) but the fipped file extension isn't .gz.
> It will procuce an exact copy of the original.
>
> This is a .tar.gz file:
>
> -rw-r--r--    1 root     root          2736 Oct 21 16:32 foo.tar.bar
>
> # zcat foo.tar.bar >foo.tar;echo $?
> 0
>
> -rw-r--r--    1 root     root          2736 Oct 21 16:37 foo.tar
> -rw-r--r--    1 root     root          2736 Oct 21 16:32 foo.tar.bar
>
> Attemting to extract the archive will fail instead, with appropriate
> exit status.

If I do:

# ln -s foo.tar.bar foo.tar.gz
# zcat foo.tar.gz >foo.tar;echo $?
0

-rw-r--r--    1 root     root         40960 Oct 21 17:37 foo.tar
-rw-r--r--    1 root     root          2736 Oct 21 17:36 foo.tar.bar
lrwxrwxrwx    1 root     root            11 Oct 21 17:37 foo.tar.gz -> 
foo.tar.bar

I get what I expect.


Cheers,

-- 
Cristian
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to