Merge pull request #6496 from i30817/fix-scan-dot-in-directories

fix scanner skipping directories with dots
This commit is contained in:
Twinaphex 2018-04-11 04:08:12 +02:00 committed by GitHub
commit ad671a153a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -185,13 +185,16 @@ static int dir_list_read(const char *dir,
bool is_dir = false;
int ret = 0;
const char *name = retro_dirent_get_name(entry);
const char *file_ext = path_get_extension(name);
const char *file_ext = "";
file_path[0] = '\0';
fill_pathname_join(file_path, dir, name, sizeof(file_path));
is_dir = retro_dirent_is_dir(entry, file_path);
if(!is_dir)
file_ext = path_get_extension(name);
if (!include_hidden)
{
if (*name == '.')
@ -200,7 +203,7 @@ static int dir_list_read(const char *dir,
if(is_dir && recursive)
{
if(strstr(name, ".") || strstr(name, ".."))
if(strcmp(name, ".") == 0 || strcmp(name, "..") == 0)
continue;
dir_list_read(file_path, list, ext_list, include_dirs,