mirror of
https://github.com/facebook/zstd.git
synced 2025-07-30 22:23:13 +03:00
Added check to perform comparison only if extension is present
This commit is contained in:
@ -334,13 +334,16 @@ NO => return 0
|
||||
int UTIL_isCompressedFile(const char *inputName, const char *extensionList[])
|
||||
{
|
||||
const char* ext = UTIL_getFileExtension(inputName);
|
||||
while(*extensionList!=NULL)
|
||||
{
|
||||
const char* isCompressedExtension = strstr(ext,*extensionList);
|
||||
if(isCompressedExtension)
|
||||
return 1;
|
||||
++extensionList;
|
||||
}
|
||||
if(strcmp(ext,""))
|
||||
{
|
||||
while(*extensionList!=NULL)
|
||||
{
|
||||
const char* isCompressedExtension = strstr(ext,*extensionList);
|
||||
if(isCompressedExtension)
|
||||
return 1;
|
||||
++extensionList;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user