mirror of
https://github.com/libsdl-org/SDL
synced 2024-11-20 16:06:10 -07:00
SDL_EnumerateDirectory(): (posix) Fix return value when directory is invalid
This commit is contained in:
parent
97b924f985
commit
8468c372b2
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue