diff --git a/programs/util.c b/programs/util.c index 63e9ef9e9..f82079554 100644 --- a/programs/util.c +++ b/programs/util.c @@ -330,6 +330,7 @@ int UTIL_prepareFileList(const char *dirName, char** bufStart, size_t* pos, char YES => Skip the file (return 0) NO => return 1 */ + int UTIL_isCompressedFile(const char *inputName) { return compareExtensions(inputName,g_compressedFileExtensions); @@ -337,12 +338,14 @@ int UTIL_isCompressedFile(const char *inputName) int compareExtensions(const char* infilename, const char* extensionList[]) { + int i=0; while(*extensionList != NULL) { const char* ext = strstr(infilename,extensionList[i]); if(ext) return 1; ++extensionList; + i++; } return 0; } diff --git a/programs/zstdcli.c b/programs/zstdcli.c index a704a1abd..a5a3f30da 100644 --- a/programs/zstdcli.c +++ b/programs/zstdcli.c @@ -118,6 +118,7 @@ static int usage(const char* programName) #endif DISPLAY( " -D file: use `file` as Dictionary \n"); DISPLAY( " -o file: result stored into `file` (only if 1 input file) \n"); + DISPLAY( "--exclude-compressed: only compress files that are not previously compressed \n"); DISPLAY( " -f : overwrite output without prompting and (de)compress links \n"); DISPLAY( "--rm : remove source file(s) after successful de/compression \n"); DISPLAY( " -k : preserve source file(s) (default) \n"); diff --git a/tests/playTests.sh b/tests/playTests.sh index ca286071d..9294bf812 100755 --- a/tests/playTests.sh +++ b/tests/playTests.sh @@ -232,6 +232,7 @@ else println "Test is not successful" fi println "Test completed" +sleep 5 println "test : file removal" $ZSTD -f --rm tmp