diff options
| author | [email protected] <[email protected]> | 2010-10-03 03:18:19 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2010-10-03 03:18:19 +0000 |
| commit | 47c51011244d1525045d64f763b57e7dfa389075 (patch) | |
| tree | 3a27d76c07e71e2f87ef8e577db467359df1f40f /components/dfs | |
| parent | c37979560da12b4bd3f6a72cbc77c8c3ec3f2530 (diff) | |
第415行
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;
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@997 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/dfs')
| -rw-r--r-- | components/dfs/filesystems/elmfat/dfs_elm.c | 4 |
1 files 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);
|
