mirror of
https://github.com/nothings/stb
synced 2024-12-16 04:42:42 +03:00
Merge branch 'master' of https://github.com/mikesart/stb into stb_h_fix
This commit is contained in:
commit
e27cb7fcbf
9
stb.h
9
stb.h
@ -5863,6 +5863,13 @@ void stb_readdir_free(char **files)
|
|||||||
stb_arr_free(f2);
|
stb_arr_free(f2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int isdotdirname(char *name)
|
||||||
|
{
|
||||||
|
if (name[0] == '.')
|
||||||
|
return (name[1] == '.') ? !name[2] : !name[1];
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
STB_EXTERN int stb_wildmatchi(char *expr, char *candidate);
|
STB_EXTERN int stb_wildmatchi(char *expr, char *candidate);
|
||||||
static char **readdir_raw(char *dir, int return_subdirs, char *mask)
|
static char **readdir_raw(char *dir, int return_subdirs, char *mask)
|
||||||
{
|
{
|
||||||
@ -5931,7 +5938,7 @@ static char **readdir_raw(char *dir, int return_subdirs, char *mask)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (is_subdir == return_subdirs) {
|
if (is_subdir == return_subdirs) {
|
||||||
if (!is_subdir || name[0] != '.') {
|
if (!is_subdir || !isdotdirname(name)) {
|
||||||
if (!mask || stb_wildmatchi(mask, name)) {
|
if (!mask || stb_wildmatchi(mask, name)) {
|
||||||
char buffer[512],*p=buffer;
|
char buffer[512],*p=buffer;
|
||||||
sprintf(buffer, "%s%s", with_slash, name);
|
sprintf(buffer, "%s%s", with_slash, name);
|
||||||
|
Loading…
Reference in New Issue
Block a user