summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1997-04-13 08:39:38 +0000
committerjoerg <joerg@FreeBSD.org>1997-04-13 08:39:38 +0000
commiteefd272abd4a24b254ee8da3730cf125ad7dc408 (patch)
treeb8b52d3f96432a9a7ff78cf9be6265cd3219b2a4 /gnu
parentfabf2fcbddbb073c926c84d944a4976f37f8ebdc (diff)
downloadFreeBSD-src-eefd272abd4a24b254ee8da3730cf125ad7dc408.zip
FreeBSD-src-eefd272abd4a24b254ee8da3730cf125ad7dc408.tar.gz
Don't create anything on the disk if -O (aka --to-stdout) was given.
PR: gnu/3247: tar -O creates directories...
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/tar/extract.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gnu/usr.bin/tar/extract.c b/gnu/usr.bin/tar/extract.c
index 2730cc2..faf25ad 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 ();
OpenPOWER on IntegriCloud