diff options
| author | Ray <[email protected]> | 2023-11-06 19:15:11 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2023-11-06 19:15:11 +0100 |
| commit | 8b2103fc77b6ff162133d802eef8a33193fb8902 (patch) | |
| tree | 0480d61214cc7330f239e281b30b64ae1166399e /src/rcore.c | |
| parent | b216e2fc98a66575d708529af8c23483aeadaa2e (diff) | |
| download | raylib-8b2103fc77b6ff162133d802eef8a33193fb8902.tar.gz raylib-8b2103fc77b6ff162133d802eef8a33193fb8902.zip | |
REVIEWED: `ScanDirectoryFiles*()`- Paths building slashes sides #3507
Diffstat (limited to 'src/rcore.c')
| -rw-r--r-- | src/rcore.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rcore.c b/src/rcore.c index 4c7eded2..bbbebbd5 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -3173,7 +3173,11 @@ static void ScanDirectoryFiles(const char *basePath, FilePathList *files, const if ((strcmp(dp->d_name, ".") != 0) && (strcmp(dp->d_name, "..") != 0)) { + #if defined(_WIN32) + sprintf(path, "%s\\%s", basePath, dp->d_name); + #else sprintf(path, "%s/%s", basePath, dp->d_name); + #endif if (filter != NULL) { @@ -3212,7 +3216,11 @@ static void ScanDirectoryFilesRecursively(const char *basePath, FilePathList *fi if ((strcmp(dp->d_name, ".") != 0) && (strcmp(dp->d_name, "..") != 0)) { // Construct new path from our base path + #if defined(_WIN32) + sprintf(path, "%s\\%s", basePath, dp->d_name); + #else sprintf(path, "%s/%s", basePath, dp->d_name); + #endif if (IsPathFile(path)) { |
