mirror of
https://github.com/facebook/zstd.git
synced 2025-07-30 22:23:13 +03:00
Merge pull request #2330 from senhuang42/fix_stdinout_error_messages
Improve error messages on console input/output
This commit is contained in:
@ -1243,7 +1243,7 @@ int main(int const argCount, const char* argv[])
|
|||||||
|
|
||||||
/* Check if input/output defined as console; trigger an error in this case */
|
/* Check if input/output defined as console; trigger an error in this case */
|
||||||
if (!strcmp(filenames->fileNames[0], stdinmark) && IS_CONSOLE(stdin) ) {
|
if (!strcmp(filenames->fileNames[0], stdinmark) && IS_CONSOLE(stdin) ) {
|
||||||
badusage(programName);
|
DISPLAYLEVEL(1, "stdin is a console, aborting\n");
|
||||||
CLEAN_RETURN(1);
|
CLEAN_RETURN(1);
|
||||||
}
|
}
|
||||||
if ( outFileName && !strcmp(outFileName, stdoutmark)
|
if ( outFileName && !strcmp(outFileName, stdoutmark)
|
||||||
@ -1251,7 +1251,7 @@ int main(int const argCount, const char* argv[])
|
|||||||
&& !strcmp(filenames->fileNames[0], stdinmark)
|
&& !strcmp(filenames->fileNames[0], stdinmark)
|
||||||
&& !forceStdout
|
&& !forceStdout
|
||||||
&& operation!=zom_decompress ) {
|
&& operation!=zom_decompress ) {
|
||||||
badusage(programName);
|
DISPLAYLEVEL(1, "stdout is a console, aborting\n");
|
||||||
CLEAN_RETURN(1);
|
CLEAN_RETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user