mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-31 06:11:04 +02:00
SDL_GlobDirectory(): Don't descend into sub-directories, if not requested by pattern
(cherry picked from commit d6129d063f)
This commit is contained in:
committed by
Ryan C. Gordon
parent
270c2b8e86
commit
8af454a0a1
@@ -203,7 +203,7 @@ static bool WildcardMatch(const char *pattern, const char *str, bool *matched_to
|
||||
pch = *(++pattern);
|
||||
}
|
||||
|
||||
*matched_to_dir = ((pch == '/') || (pch == '\0')); // end of string and the pattern is complete or failed at a '/'? We should descend into this directory.
|
||||
*matched_to_dir = (pch == '/'); // end of string and the pattern failed at a '/'? We should descend into this directory.
|
||||
|
||||
return (pch == '\0'); // survived the whole pattern? That's a match!
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user