Fix from Robert Kaiser for stdin behavior.

-Erik
This commit is contained in:
Eric Andersen 2000-07-28 15:20:24 +00:00
parent 1428c4f136
commit d5704686b1
2 changed files with 2 additions and 2 deletions

View File

@ -167,7 +167,7 @@ extern int tar_main(int argc, char **argv)
tarName = *(++argv);
if (tarName == NULL)
fatalError( "Option requires an argument: No file specified\n");
if (!strcmp(tarName, "-"))
if (!strcmp(tarName, "-") && createFlag == TRUE)
tostdoutFlag = TRUE;
stopIt=TRUE;
break;

2
tar.c
View File

@ -167,7 +167,7 @@ extern int tar_main(int argc, char **argv)
tarName = *(++argv);
if (tarName == NULL)
fatalError( "Option requires an argument: No file specified\n");
if (!strcmp(tarName, "-"))
if (!strcmp(tarName, "-") && createFlag == TRUE)
tostdoutFlag = TRUE;
stopIt=TRUE;
break;