Mac OS .* files are filtered out

This commit is contained in:
Stephen White 2019-04-28 15:41:24 +10:00
parent f28e371763
commit 47355edeff
2 changed files with 2 additions and 2 deletions

View file

@ -622,7 +622,7 @@ void FileBrowser::RefreshFolderEntries()
{
res = f_readdir(&dir, &entry.filImage);
ext = strrchr(entry.filImage.fname, '.');
if (res == FR_OK && entry.filImage.fname[0] != 0 && !(ext && strcasecmp(ext, ".png") == 0))
if (res == FR_OK && entry.filImage.fname[0] != 0 && !(ext && strcasecmp(ext, ".png") == 0) && (entry.filImage.fname[0] != '.'))
folder.entries.push_back(entry);
} while (res == FR_OK && entry.filImage.fname[0] != 0);
f_closedir(&dir);

View file

@ -1749,7 +1749,7 @@ void IEC_Commands::LoadDirectory()
{
res = f_readdir(&dir, &entry.filImage);
ext = strrchr(entry.filImage.fname, '.');
if (res == FR_OK && entry.filImage.fname[0] != 0 && !(ext && strcasecmp(ext, ".png") == 0))
if (res == FR_OK && entry.filImage.fname[0] != 0 && !(ext && strcasecmp(ext, ".png") == 0) && (entry.filImage.fname[0] != '.'))
entries.push_back(entry);
} while (res == FR_OK && entry.filImage.fname[0] != 0);
f_closedir(&dir);