SDL_EnumerateDirectory(): (posix) Fix return value when directory is invalid
Some checks failed
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled

This commit is contained in:
Petar Popovic 2024-10-26 07:13:00 +02:00 committed by Sam Lantinga
parent 97b924f985
commit 8468c372b2

View file

@ -40,8 +40,7 @@ bool SDL_SYS_EnumerateDirectory(const char *path, const char *dirname, SDL_Enume
DIR *dir = opendir(path);
if (!dir) {
SDL_SetError("Can't open directory: %s", strerror(errno));
return -1;
return SDL_SetError("Can't open directory: %s", strerror(errno));
}
struct dirent *ent;