[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.
This commit is contained in:
Hugo ARNAL 2025-11-07 23:13:37 +01:00
parent c74c989516
commit 3dbd1e5746

View File

@ -74,7 +74,7 @@ int main(void)
{ {
Color color = Fade(LIGHTGRAY, 0.3f); Color color = Fade(LIGHTGRAY, 0.3f);
if (!IsPathFile(files.paths[i])) if (!IsPathFile(files.paths[i]) && DirectoryExists(files.paths[i]))
{ {
if (GuiButton((Rectangle){0.0f, 85.0f + 40.0f*(float)i, screenWidth, 40}, "")) if (GuiButton((Rectangle){0.0f, 85.0f + 40.0f*(float)i, screenWidth, 40}, ""))
{ {