1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-16 21:05:26 +03:00

Projectkk2glider/fatfs 0.12 (#3925)

* Re #3815: Disk cache: Write statistic added. Bigger disk cache. Show disk cache misses in CLI.

* Update to the latest FatFS R0.12b (all existing OpenTX patches have been already applied in upstream, only few ff.h modifications needed for simulator)

* Missing file

* SD card manager: do not show parent dir [..] for root directory
This commit is contained in:
Damjan Adamic 2016-10-18 18:14:17 +02:00 committed by Bertrand Songis
parent eb24bbacbb
commit 4513cf89f2
29 changed files with 8325 additions and 6636 deletions

View file

@ -1118,10 +1118,6 @@ void luaLoadFiles(const char * directory, void (*callback)())
char path[LUA_FULLPATH_MAXLEN+1];
FILINFO fno;
DIR dir;
char * fn; /* This function is assuming non-Unicode cfg. */
TCHAR lfn[_MAX_LFN + 1];
fno.lfname = lfn;
fno.lfsize = sizeof(lfn);
strcpy(path, directory);
@ -1133,10 +1129,9 @@ void luaLoadFiles(const char * directory, void (*callback)())
for (;;) {
res = f_readdir(&dir, &fno); /* Read a directory item */
if (res != FR_OK || fno.fname[0] == 0) break; /* Break on error or end of dir */
fn = * fno.lfname ? fno.lfname : fno.fname;
uint8_t len = strlen(fn);
if (len > 0 && fn[0]!='.' && (fno.fattrib & AM_DIR)) {
strcpy(&path[pathlen], fn);
uint8_t len = strlen(fno.fname);
if (len > 0 && fno.fname[0]!='.' && (fno.fattrib & AM_DIR)) {
strcpy(&path[pathlen], fno.fname);
strcat(&path[pathlen], "/main.lua");
if (isFileAvailable(path)) {
luaLoadFile(path, callback);