Problem with directories in simulator when listing files
This commit is contained in:
@@ -769,7 +769,7 @@ char *findTrueFileName(const char *path)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
FRESULT f_stat (const TCHAR * name, FILINFO *)
|
FRESULT f_stat (const TCHAR * name, FILINFO *fno)
|
||||||
{
|
{
|
||||||
char *path = convertSimuPath(name);
|
char *path = convertSimuPath(name);
|
||||||
char * realPath = findTrueFileName(path);
|
char * realPath = findTrueFileName(path);
|
||||||
@@ -780,6 +780,9 @@ FRESULT f_stat (const TCHAR * name, FILINFO *)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
TRACE("f_stat(%s) = OK", path);
|
TRACE("f_stat(%s) = OK", path);
|
||||||
|
if (fno) {
|
||||||
|
fno->fattrib = (tmp.st_mode & S_IFDIR) ? AM_DIR : 0;
|
||||||
|
}
|
||||||
return FR_OK;
|
return FR_OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user