From 97f50cb9e1d3708850c75e9c8966f9e30a50d751 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 2 Apr 1997 00:31:59 +0000 Subject: Deal with old-style tar archives with a directory specifier (extension). --- bin/pax/tar.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/bin/pax/tar.c b/bin/pax/tar.c index d0454cf89ff..6d2b3f908da 100644 --- a/bin/pax/tar.c +++ b/bin/pax/tar.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tar.c,v 1.7 1997/03/25 09:30:22 millert Exp $ */ +/* $OpenBSD: tar.c,v 1.8 1997/04/02 00:31:58 millert Exp $ */ /* $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $ */ /*- @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)tar.c 8.2 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$OpenBSD: tar.c,v 1.7 1997/03/25 09:30:22 millert Exp $"; +static char rcsid[] = "$OpenBSD: tar.c,v 1.8 1997/04/02 00:31:58 millert Exp $"; #endif #endif /* not lint */ @@ -503,6 +503,16 @@ tar_rd(arcn, buf) */ arcn->sb.st_mode |= S_IFREG; break; + case DIRTYPE: + /* + * It is a directory, set the mode for -v printing + */ + arcn->type = PAX_DIR; + arcn->sb.st_mode |= S_IFDIR; + arcn->sb.st_nlink = 2; + arcn->ln_name[0] = '\0'; + arcn->ln_nlen = 0; + break; case AREGTYPE: case REGTYPE: default: -- cgit v1.2.3