Skip to content

Commit d7a7eda

Browse files
hugoarnalgithub-actions[bot]raysan5
authored
[examples] core_directory_files fixes (#5343)
* [examples] reset on folder click `continue` after clicking a new folder * [examples] don't make non-directories clickable `IsPathFile` is not enough to check if it's a directory since it also takes in char devices. * rlparser: update raylib_api.* by CI * Delete tools/rlparser/rlparser --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ray <raysan5@gmail.com>
1 parent 2a324ac commit d7a7eda

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/core/core_directory_files.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,19 @@ int main(void)
6969
DrawText(directory, 100, 40, 20, DARKGRAY);
7070

7171
btnBackPressed = GuiButton((Rectangle){ 40.0f, 40.0f, 20, 20 }, "<");
72-
72+
7373
for (int i = 0; i < (int)files.count; i++)
7474
{
7575
Color color = Fade(LIGHTGRAY, 0.3f);
7676

77-
if (!IsPathFile(files.paths[i]))
77+
if (!IsPathFile(files.paths[i]) && DirectoryExists(files.paths[i]))
7878
{
7979
if (GuiButton((Rectangle){0.0f, 85.0f + 40.0f*(float)i, screenWidth, 40}, ""))
8080
{
8181
strcpy(directory, files.paths[i]);
8282
UnloadDirectoryFiles(files);
8383
files = LoadDirectoryFiles(directory);
84+
continue;
8485
}
8586
}
8687

0 commit comments

Comments
 (0)