diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-04-02 00:31:59 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-04-02 00:31:59 +0000 |
commit | 97f50cb9e1d3708850c75e9c8966f9e30a50d751 (patch) | |
tree | a5bdb26134efb0d0fc4fa70be7545c00337eff69 | |
parent | 7380c71f539df517aa508e6319ffa25b431036d5 (diff) |
Deal with old-style tar archives with a directory specifier (extension).
-rw-r--r-- | bin/pax/tar.c | 14 |
1 files 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: |