Make this check a bit faster

This commit is contained in:
twinaphex 2017-05-20 17:54:06 +02:00
parent b7b7c67ca3
commit b009b87530

View File

@ -124,7 +124,8 @@ static int parse_dir_entry(const char *name, char *file_path,
if (!include_dirs && is_dir)
return 1;
if (!strcmp(name, ".") || !strcmp(name, ".."))
if ((name[0] == '.' && name[1] == '\0') ||
(name[0] == '.' && name[1] == '.' && name[2] == '\0'))
return 1;
if (!is_dir && ext_list &&