mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-22 10:39:18 +01:00
This commit is contained in:
parent
c5c6e7be1e
commit
b1e0effdb0
@ -482,6 +482,7 @@ bool ParseDirEntries()
|
||||
return false;
|
||||
|
||||
char *ext;
|
||||
char path[MAXPATHLEN+1];
|
||||
struct dirent *entry;
|
||||
struct stat filestat;
|
||||
|
||||
@ -497,8 +498,17 @@ bool ParseDirEntries()
|
||||
if(entry->d_name[0] == '.' && entry->d_name[1] != '.')
|
||||
continue;
|
||||
|
||||
if(strcmp(entry->d_name, "..") == 0)
|
||||
{
|
||||
filestat.st_mode = _IFDIR;
|
||||
}
|
||||
else
|
||||
{
|
||||
ext = GetExt(entry->d_name);
|
||||
stat(entry->d_name,&filestat);
|
||||
snprintf(path, MAXPATHLEN, "%s%s", browser.dir, entry->d_name);
|
||||
|
||||
if(stat(path, &filestat) < 0)
|
||||
continue;
|
||||
|
||||
// don't show the file if it's not a valid ROM
|
||||
if(parseFilter && (filestat.st_mode & _IFDIR) == 0)
|
||||
@ -514,6 +524,7 @@ bool ParseDirEntries()
|
||||
stricmp(ext, "zip") != 0 && stricmp(ext, "7z") != 0)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(!AddBrowserEntry())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user