Fixed subdirectories showing in enumeration of Steam storage

This commit is contained in:
Sam Lantinga
2025-12-06 22:35:05 -08:00
parent 7e78636e8e
commit 97b0b13147

View File

@@ -137,13 +137,14 @@ static bool STEAM_EnumerateStorageDirectory(void *userdata, const char *path, SD
}
fname = file + dirlen;
} else {
// Make sure this is a top-level file
if (SDL_strchr(file, '/') != NULL) {
continue;
}
fname = file;
}
// Make sure this is a file in the current directory
if (SDL_strchr(fname, '/') != NULL) {
continue;
}
switch (callback(callback_userdata, dirname, fname)) {
case SDL_ENUM_SUCCESS:
done = true;