Ignore UNIX dotfiles (#4973)
* Ignore UNIX dotfiles This has the advantage of hiding all the stupid .DS_STORE and ._foo.lua attributes files from Mac OS X * Do not ignore ..
This commit is contained in:
committed by
Bertrand Songis
parent
d0a57d4c47
commit
d609d37798
@@ -279,6 +279,7 @@ bool menuRadioSdManager(event_t _event)
|
||||
res = sdReadDir(&dir, &fno, firstTime);
|
||||
if (res != FR_OK || fno.fname[0] == 0) break; /* Break on error or end of dir */
|
||||
if (strlen(fno.fname) > SD_SCREEN_FILE_LENGTH) continue;
|
||||
if (fno.fname[0] == '.' && fno.fname[1] != '.') continue; /* Ignore hidden files under UNIX, but not .. */
|
||||
|
||||
reusableBuffer.sdmanager.count++;
|
||||
|
||||
|
||||
@@ -340,6 +340,7 @@ void menuRadioSdManager(event_t _event)
|
||||
res = sdReadDir(&dir, &fno, firstTime);
|
||||
if (res != FR_OK || fno.fname[0] == 0) break; /* Break on error or end of dir */
|
||||
if (strlen(fno.fname) > SD_SCREEN_FILE_LENGTH) continue;
|
||||
if (fno.fname[0] == '.' && fno.fname[1] != '.') continue; /* Ignore hidden files under UNIX, but not .. */
|
||||
|
||||
reusableBuffer.sdmanager.count++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user