Problem with directories in simulator when listing files

This commit is contained in:
Bertrand Songis
2016-06-07 20:35:17 +02:00
parent 5ee95c472a
commit 8493a393fd
+4 -1
View File
@@ -769,7 +769,7 @@ char *findTrueFileName(const char *path)
return result;
}
FRESULT f_stat (const TCHAR * name, FILINFO *)
FRESULT f_stat (const TCHAR * name, FILINFO *fno)
{
char *path = convertSimuPath(name);
char * realPath = findTrueFileName(path);
@@ -780,6 +780,9 @@ FRESULT f_stat (const TCHAR * name, FILINFO *)
}
else {
TRACE("f_stat(%s) = OK", path);
if (fno) {
fno->fattrib = (tmp.st_mode & S_IFDIR) ? AM_DIR : 0;
}
return FR_OK;
}
}