mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
fix scanner skipping directories with dots
This commit is contained in:
parent
05e34654c6
commit
7e43db9cf1
@ -185,13 +185,16 @@ static int dir_list_read(const char *dir,
|
|||||||
bool is_dir = false;
|
bool is_dir = false;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
const char *name = retro_dirent_get_name(entry);
|
const char *name = retro_dirent_get_name(entry);
|
||||||
const char *file_ext = path_get_extension(name);
|
const char *file_ext = "";
|
||||||
|
|
||||||
file_path[0] = '\0';
|
file_path[0] = '\0';
|
||||||
|
|
||||||
fill_pathname_join(file_path, dir, name, sizeof(file_path));
|
fill_pathname_join(file_path, dir, name, sizeof(file_path));
|
||||||
is_dir = retro_dirent_is_dir(entry, file_path);
|
is_dir = retro_dirent_is_dir(entry, file_path);
|
||||||
|
|
||||||
|
if(!is_dir)
|
||||||
|
file_ext = path_get_extension(name);
|
||||||
|
|
||||||
if (!include_hidden)
|
if (!include_hidden)
|
||||||
{
|
{
|
||||||
if (*name == '.')
|
if (*name == '.')
|
||||||
@ -200,7 +203,7 @@ static int dir_list_read(const char *dir,
|
|||||||
|
|
||||||
if(is_dir && recursive)
|
if(is_dir && recursive)
|
||||||
{
|
{
|
||||||
if(strstr(name, ".") || strstr(name, ".."))
|
if(strcmp(name, ".") == 0 || strcmp(name, "..") == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
dir_list_read(file_path, list, ext_list, include_dirs,
|
dir_list_read(file_path, list, ext_list, include_dirs,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user