diff options
Diffstat (limited to 'programs/lz4cli.c')
-rw-r--r-- | programs/lz4cli.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/programs/lz4cli.c b/programs/lz4cli.c index 5da7654..e95050b 100644 --- a/programs/lz4cli.c +++ b/programs/lz4cli.c @@ -625,10 +625,18 @@ int main(int argc, const char** argv) #endif } + if (dictionary_filename) { + if (!strcmp(dictionary_filename, stdinmark) && IS_CONSOLE(stdin)) { + DISPLAYLEVEL(1, "refusing to read from a console\n"); + exit(1); + } + LZ4IO_setDictionaryFilename(prefs, dictionary_filename); + } + /* benchmark and test modes */ if (mode == om_bench) { BMK_setNotificationLevel(displayLevel); - operationResult = BMK_benchFiles(inFileNames, ifnIdx, cLevel, cLevelLast); + operationResult = BMK_benchFiles(inFileNames, ifnIdx, cLevel, cLevelLast, dictionary_filename); goto _cleanup; } @@ -638,14 +646,6 @@ int main(int argc, const char** argv) mode = om_decompress; /* defer to decompress */ } - if (dictionary_filename) { - if (!strcmp(dictionary_filename, stdinmark) && IS_CONSOLE(stdin)) { - DISPLAYLEVEL(1, "refusing to read from a console\n"); - exit(1); - } - LZ4IO_setDictionaryFilename(prefs, dictionary_filename); - } - /* compress or decompress */ if (!input_filename) input_filename = stdinmark; /* Check if input is defined as console; trigger an error in this case */ |