From 47c51011244d1525045d64f763b57e7dfa389075 Mon Sep 17 00:00:00 2001 From: "jiaojinxing1987@gmail.com" Date: Sun, 3 Oct 2010 03:18:19 +0000 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC415=E8=A1=8C=20=09=09if=20(fno.fattrib?= =?UTF-8?q?=20&=20AM=5FDIR)=20d->d=5Ftype=20&=3D=20DFS=5FDT=5FDIR;=20=09?= =?UTF-8?q?=09else=20d->d=5Ftype=20&=3D=20DFS=5FDT=5FREG;=20=E6=94=B9?= =?UTF-8?q?=E4=B8=BA:=20=09=09if=20(fno.fattrib=20&=20AM=5FDIR)=20d->d=5Ft?= =?UTF-8?q?ype=20=3D=20DFS=5FDT=5FDIR;=20=09=09else=20d->d=5Ftype=20=3D=20?= =?UTF-8?q?DFS=5FDT=5FREG;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://rt-thread.googlecode.com/svn/trunk@997 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- components/dfs/filesystems/elmfat/dfs_elm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/dfs/filesystems/elmfat/dfs_elm.c b/components/dfs/filesystems/elmfat/dfs_elm.c index ebed2b8b5d..43facf04eb 100644 --- a/components/dfs/filesystems/elmfat/dfs_elm.c +++ b/components/dfs/filesystems/elmfat/dfs_elm.c @@ -412,8 +412,8 @@ int dfs_elm_getdents(struct dfs_fd* file, struct _dirent* dirp, rt_uint32_t coun #endif d->d_type = DFS_DT_UNKNOWN; - if (fno.fattrib & AM_DIR) d->d_type &= DFS_DT_DIR; - else d->d_type &= DFS_DT_REG; + if (fno.fattrib & AM_DIR) d->d_type = DFS_DT_DIR; + else d->d_type = DFS_DT_REG; d->d_namlen = rt_strlen(fn); d->d_reclen = (rt_uint16_t)sizeof(struct _dirent); -- GitLab