From: millert Date: Wed, 2 Apr 1997 00:31:58 +0000 (+0000) Subject: Deal with old-style tar archives with a directory specifier (extension). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9a5902799cb87c529d4d7748067036a5f8100442;p=openbsd Deal with old-style tar archives with a directory specifier (extension). --- 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: