[DFS_V1]修复 dfs_file_stat 一个 FATFS 根目录会失败的问题 (#7940)

This commit is contained in:
Junjie Wang 2023-08-20 08:46:09 +08:00 committed by GitHub
parent 6dd3802d0a
commit 166c83f372
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -4746,7 +4746,7 @@ FRESULT f_stat (
res = follow_path(&dj, path); /* Follow the file path */
if (res == FR_OK) { /* Follow completed */
if (dj.fn[NSFLAG] & NS_NONAME) { /* It is origin directory */
res = FR_INVALID_NAME;
fno->fattrib = AM_DIR;
} else { /* Found an object */
if (fno) get_fileinfo(&dj, fno);
}