From owner-freebsd-bugs Sun Apr 13 01:30:04 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id BAA23721 for bugs-outgoing; Sun, 13 Apr 1997 01:30:04 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id BAA23714; Sun, 13 Apr 1997 01:30:02 -0700 (PDT) Date: Sun, 13 Apr 1997 01:30:02 -0700 (PDT) Message-Id: <199704130830.BAA23714@freefall.freebsd.org> To: freebsd-bugs Cc: From: j@uriah.heep.sax.de (J Wunsch) Subject: Re: gnu/3247: tar -O creates directories Reply-To: j@uriah.heep.sax.de (J Wunsch) Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR gnu/3247; it has been noted by GNATS. From: j@uriah.heep.sax.de (J Wunsch) To: eserte@cs.tu-berlin.de Cc: freebsd-gnats-submit@freebsd.org Subject: Re: gnu/3247: tar -O creates directories Date: Sun, 13 Apr 1997 09:58:05 +0200 As Slaven Rezic wrote: > Jörg, try: > > 4:55 eserte@cabulja 301 (/tmp): tar -xOzf foobar.tar.gz > /dev/null > 4:56 eserte@cabulja 302 (/tmp): ls -lR foo bar Ah, now i understand what's going on... btw., it did extract even more junk, for example symlinks, to the disk. The following should fix it: Index: tar/extract.c =================================================================== RCS file: /home/cvs/src/gnu/usr.bin/tar/extract.c,v retrieving revision 1.4 diff -u -u -r1.4 extract.c --- extract.c 1996/11/03 14:47:51 1.4 +++ extract.c 1997/04/13 07:54:18 @@ -158,7 +158,10 @@ userec (head); /* And go past it in the archive */ decode_header (head, &hstat, &head_standard, 1); /* Snarf fields */ - if (f_confirm && !confirm ("extract", current_file_name)) + if ((f_confirm && !confirm ("extract", current_file_name)) || + (f_exstdout && head->header.linkflag != LF_OLDNORMAL && + head->header.linkflag != LF_NORMAL && + head->header.linkflag != LF_CONTIG)) { if (head->header.isextended) skip_extended_headers (); p.s.: please avoid putting invalid addresses into your outgoing mail headers (Cc in this case). That's why sendmail offers you the feature to rewrite the headers. :-} -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)