use strstr instead of TextFindIndex (#4764)

This commit is contained in:
mannikim
2025-02-13 23:58:33 +00:00
committed by GitHub
parent 1d87932d93
commit ee946b2f16

View File

@@ -3696,7 +3696,7 @@ static void ScanDirectoryFiles(const char *basePath, FilePathList *files, const
}
else
{
if (TextFindIndex(filter, DIRECTORY_FILTER_TAG) >= 0)
if (strstr(filter, DIRECTORY_FILTER_TAG) != NULL)
{
strcpy(files->paths[files->count], path);
files->count++;
@@ -3762,7 +3762,7 @@ static void ScanDirectoryFilesRecursively(const char *basePath, FilePathList *fi
}
else
{
if ((filter != NULL) && (TextFindIndex(filter, DIRECTORY_FILTER_TAG) >= 0))
if ((filter != NULL) && (strstr(filter, DIRECTORY_FILTER_TAG) != NULL))
{
strcpy(files->paths[files->count], path);
files->count++;