Skip to content

Commit 8b2103f

Browse files
committed
REVIEWED: ScanDirectoryFiles*()- Paths building slashes sides #3507
1 parent b216e2f commit 8b2103f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/rcore.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3173,7 +3173,11 @@ static void ScanDirectoryFiles(const char *basePath, FilePathList *files, const
31733173
if ((strcmp(dp->d_name, ".") != 0) &&
31743174
(strcmp(dp->d_name, "..") != 0))
31753175
{
3176+
#if defined(_WIN32)
3177+
sprintf(path, "%s\\%s", basePath, dp->d_name);
3178+
#else
31763179
sprintf(path, "%s/%s", basePath, dp->d_name);
3180+
#endif
31773181

31783182
if (filter != NULL)
31793183
{
@@ -3212,7 +3216,11 @@ static void ScanDirectoryFilesRecursively(const char *basePath, FilePathList *fi
32123216
if ((strcmp(dp->d_name, ".") != 0) && (strcmp(dp->d_name, "..") != 0))
32133217
{
32143218
// Construct new path from our base path
3219+
#if defined(_WIN32)
3220+
sprintf(path, "%s\\%s", basePath, dp->d_name);
3221+
#else
32153222
sprintf(path, "%s/%s", basePath, dp->d_name);
3223+
#endif
32163224

32173225
if (IsPathFile(path))
32183226
{

0 commit comments

Comments
 (0)