Browse Source

REVIEWED: Directory filter tag #4323

pull/4331/head
Ray 2 months ago
parent
commit
627e76cf7b
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      src/rcore.c

+ 5
- 5
src/rcore.c View File

@ -251,9 +251,9 @@ unsigned int __stdcall timeEndPeriod(unsigned int uPeriod);
#define MAX_AUTOMATION_EVENTS 16384 // Maximum number of automation events to record
#endif
#ifndef FILTER_FOLDER
#define FILTER_FOLDER "/DIR" // Filter string used in ScanDirectoryFiles, ScanDirectoryFilesRecursively and LoadDirectoryFilesEx to include directories in the result array
#endif
#ifndef DIRECTORY_FILTER_TAG
#define DIRECTORY_FILTER_TAG "DIR" // Name tag used to request directory inclusion on directory scan
#endif // NOTE: Used in ScanDirectoryFiles(), ScanDirectoryFilesRecursively() and LoadDirectoryFilesEx()
// Flags operation macros
#define FLAG_SET(n, f) ((n) |= (f))
@ -3353,7 +3353,7 @@ static void ScanDirectoryFiles(const char *basePath, FilePathList *files, const
}
else
{
if (TextFindIndex(filter, FILTER_FOLDER) >= 0)
if (TextFindIndex(filter, DIRECTORY_FILTER_TAG) >= 0)
{
strcpy(files->paths[files->count], path);
files->count++;
@ -3419,7 +3419,7 @@ static void ScanDirectoryFilesRecursively(const char *basePath, FilePathList *fi
}
else
{
if (filter != NULL && TextFindIndex(filter, FILTER_FOLDER) >= 0)
if (p">(filter != NULL) && p">(TextFindIndex(filter, DIRECTORY_FILTER_TAG) >= 0))
{
strcpy(files->paths[files->count], path);
files->count++;

Loading…
Cancel
Save