fix readdir issue.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@147 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong committed 2009-11-03 23:57:29 +00:00
1 parent 6c27bf33ff
commit fee61e2c2a
2 files changed
+74 -70

No files matched your search

+2 -2
View File
@@ -302,9 +302,9 @@ int dfs_elm_getdents(struct dfs_fd* file, struct dfs_dirent* dirp, rt_uint32_t c
if (fno.fattrib & AM_DIR) d->d_type &= DFS_DT_DIR;
else d->d_type &= DFS_DT_REG;
d->d_namlen = rt_strlen(fn) - 1;
d->d_namlen = rt_strlen(fn);
d->d_reclen = (rt_uint16_t)sizeof(struct dfs_dirent);
rt_strncpy(d->d_name, fn, rt_strlen(fn));
rt_strncpy(d->d_name, fn, rt_strlen(fn) + 1);
index ++;
if ( index * sizeof(struct dfs_dirent) >= count )
File diff suppressed because it is too large. Load diff