summaryrefslogtreecommitdiffstats
path: root/programs/lz4cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'programs/lz4cli.c')
-rw-r--r--programs/lz4cli.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/programs/lz4cli.c b/programs/lz4cli.c
index 57a6ab9..49fa492 100644
--- a/programs/lz4cli.c
+++ b/programs/lz4cli.c
@@ -712,11 +712,6 @@ int main(int argc, const char** argv)
}
if (mode == om_list){
- /* Exit if trying to read from stdin as this isn't supported in this mode */
- if(!strcmp(input_filename, stdinmark)){
- DISPLAYLEVEL(1, "refusing to read from standard input in --list mode\n");
- exit(1);
- }
if(!multiple_inputs){
inFileNames[ifnIdx++] = input_filename;
}
@@ -729,7 +724,7 @@ int main(int argc, const char** argv)
if (!output_filename) output_filename = "*\\dummy^!//";
/* Check if output is defined as console; trigger an error in this case */
- if (!strcmp(output_filename,stdoutmark) && IS_CONSOLE(stdout) && !forceStdout) {
+ if (!strcmp(output_filename,stdoutmark) && mode != om_list && IS_CONSOLE(stdout) && !forceStdout) {
DISPLAYLEVEL(1, "refusing to write to console without -c \n");
exit(1);
}