From 166c83f372b098ef80b58253184b6d6672d2162b Mon Sep 17 00:00:00 2001 From: Junjie Wang <34395906+WKJay@users.noreply.github.com> Date: Sun, 20 Aug 2023 08:46:09 +0800 Subject: [DFS_V1]修复 dfs_file_stat 一个 FATFS 根目录会失败的问题 (#7940) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/dfs/dfs_v1/filesystems/elmfat/ff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'components') diff --git a/components/dfs/dfs_v1/filesystems/elmfat/ff.c b/components/dfs/dfs_v1/filesystems/elmfat/ff.c index 815c3d2b83..80e194d6e9 100644 --- a/components/dfs/dfs_v1/filesystems/elmfat/ff.c +++ b/components/dfs/dfs_v1/filesystems/elmfat/ff.c @@ -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); } -- cgit v1.3.1