Don't create anything on the disk if -O (aka --to-stdout) was given.

PR:		gnu/3247: tar -O creates directories...
This commit is contained in:
Joerg Wunsch 1997-04-13 08:39:38 +00:00
parent deb9eaa91f
commit a08b0cc730

View File

@ -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 ();