Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Apr 1997 01:30:02 -0700 (PDT)
From:      j@uriah.heep.sax.de (J Wunsch)
To:        freebsd-bugs
Subject:   Re: gnu/3247: tar -O creates directories
Message-ID:  <199704130830.BAA23714@freefall.freebsd.org>

index | next in thread | raw e-mail

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. ;-)


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704130830.BAA23714>