Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/usr.bin/tar Only skip some bytes if the associated objec...



details:   https://anonhg.NetBSD.org/src/rev/da15d25486fc
branches:  trunk
changeset: 480881:da15d25486fc
user:      hubertf <hubertf%NetBSD.org@localhost>
date:      Sat Jan 22 14:04:15 2000 +0000

description:
Only skip some bytes if the associated object is not a dir.
Needed for some tar files.

Fixes PR 9274 by Giles Lean <giles%nemeton.com.au@localhost>

diffstat:

 gnu/usr.bin/tar/list.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r 4b07ba8c3ef3 -r da15d25486fc gnu/usr.bin/tar/list.c
--- a/gnu/usr.bin/tar/list.c    Sat Jan 22 12:34:57 2000 +0000
+++ b/gnu/usr.bin/tar/list.c    Sat Jan 22 14:04:15 2000 +0000
@@ -18,7 +18,7 @@
 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #ifndef lint
-static char rcsid[] = "$Id: list.c,v 1.6 1999/08/24 18:40:10 bad Exp $";
+static char rcsid[] = "$Id: list.c,v 1.7 2000/01/22 14:04:15 hubertf Exp $";
 #endif /* not lint */
 
 /*
@@ -291,7 +291,8 @@
     save_name = current_file_name;
   /* Skip to the next header on the archive */
 
-  skip_file ((long) hstat.st_size);
+  if (head->header.linkflag != LF_DIR)
+    skip_file ((long) hstat.st_size);
 
   if (f_multivol)
     save_name = 0;



Home | Main Index | Thread Index | Old Index