第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
This commit is contained in:
parent
c37979560d
commit
47c5101124
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user