mirror of
https://github.com/opentx/opentx.git
synced 2025-07-24 00:35:18 +03:00
Merge branch 'next' into bsongis/Issue713_more_custom_functions
This commit is contained in:
commit
5a7fda2f81
3 changed files with 8 additions and 5 deletions
|
@ -551,9 +551,11 @@ FRESULT f_readdir (DIR * rep, FILINFO * fil)
|
|||
fil->fattrib = (ent->d_type == DT_DIR ? AM_DIR : 0);
|
||||
#else
|
||||
if (ent->d_type == simu::DT_UNKNOWN) {
|
||||
fil->fattrib = 0;
|
||||
struct stat buf;
|
||||
lstat(ent->d_name, &buf);
|
||||
fil->fattrib = (S_ISDIR(buf.st_mode) ? AM_DIR : 0);
|
||||
if (stat(ent->d_name, &buf) == 0) {
|
||||
fil->fattrib = (S_ISDIR(buf.st_mode) ? AM_DIR : 0);
|
||||
}
|
||||
}
|
||||
else {
|
||||
fil->fattrib = (ent->d_type == simu::DT_DIR ? AM_DIR : 0);
|
||||
|
@ -564,6 +566,7 @@ FRESULT f_readdir (DIR * rep, FILINFO * fil)
|
|||
memset(fil->lfname, 0, SD_SCREEN_FILE_LENGTH);
|
||||
strncpy(fil->fname, ent->d_name, 13-1);
|
||||
strcpy(fil->lfname, ent->d_name);
|
||||
// TRACE("f_readdir(): %s", fil->fname);
|
||||
return FR_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue