mirror of
https://github.com/facebook/zstd.git
synced 2025-10-15 00:02:02 -04:00
added in check suffix check to ensure file was compressed with zstd
This commit is contained in:
parent
901435e9ef
commit
4128f67a4a
@ -864,7 +864,11 @@ int FIO_compressFilename(const char* dstFileName, const char* srcFileName,
|
||||
|
||||
int FIO_listFile(const char* infilename){
|
||||
DISPLAY("FILE DETECTED: %s\n", infilename);
|
||||
DISPLAY("working\n");
|
||||
const char* const suffixPtr = strrchr(infilename, '.');
|
||||
if(!suffixPtr || strcmp(suffixPtr, ZSTD_EXTENSION)){
|
||||
DISPLAYLEVEL(1, "file %s was not compressed with zstd -- ignoring\n", infilename);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user