From a08b0cc730ac6b7a0a31f6ddb5df4d7931df4bdf Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Sun, 13 Apr 1997 08:39:38 +0000 Subject: [PATCH] Don't create anything on the disk if -O (aka --to-stdout) was given. PR: gnu/3247: tar -O creates directories... --- gnu/usr.bin/tar/extract.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/usr.bin/tar/extract.c b/gnu/usr.bin/tar/extract.c index 2730cc2a3665..faf25adbc78d 100644 --- a/gnu/usr.bin/tar/extract.c +++ b/gnu/usr.bin/tar/extract.c @@ -158,7 +158,10 @@ extract_archive () 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 ();