mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
SDL_EnumerateDirectory(): (posix) Fix return value when directory is invalid
This commit is contained in:

committed by
Sam Lantinga

parent
97b924f985
commit
8468c372b2
@@ -40,8 +40,7 @@ bool SDL_SYS_EnumerateDirectory(const char *path, const char *dirname, SDL_Enume
|
|||||||
|
|
||||||
DIR *dir = opendir(path);
|
DIR *dir = opendir(path);
|
||||||
if (!dir) {
|
if (!dir) {
|
||||||
SDL_SetError("Can't open directory: %s", strerror(errno));
|
return SDL_SetError("Can't open directory: %s", strerror(errno));
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct dirent *ent;
|
struct dirent *ent;
|
||||||
|
Reference in New Issue
Block a user