Skip to content

Commit 97b0b13

Browse files
committed
Fixed subdirectories showing in enumeration of Steam storage
1 parent 7e78636 commit 97b0b13

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/storage/steam/SDL_steamstorage.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,14 @@ static bool STEAM_EnumerateStorageDirectory(void *userdata, const char *path, SD
137137
}
138138
fname = file + dirlen;
139139
} else {
140-
// Make sure this is a top-level file
141-
if (SDL_strchr(file, '/') != NULL) {
142-
continue;
143-
}
144140
fname = file;
145141
}
146142

143+
// Make sure this is a file in the current directory
144+
if (SDL_strchr(fname, '/') != NULL) {
145+
continue;
146+
}
147+
147148
switch (callback(callback_userdata, dirname, fname)) {
148149
case SDL_ENUM_SUCCESS:
149150
done = true;

0 commit comments

Comments
 (0)