diff options
| author | [email protected] <[email protected]> | 2012-07-02 23:28:06 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2012-07-02 23:28:06 +0000 |
| commit | 760f8378714ba82bf5d35ea0caf26835d6142db3 (patch) | |
| tree | 60b3cbd2f0015691ed9723f16f000afdcac401c6 /examples/file/listdir.c | |
| parent | ee546fb0d47c985f385d2d62be5fced3d1d2db59 (diff) | |
fixed list directory issue on path.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2200 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'examples/file/listdir.c')
| -rw-r--r-- | examples/file/listdir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/file/listdir.c b/examples/file/listdir.c index c2065e4013..991351fc6c 100644 --- a/examples/file/listdir.c +++ b/examples/file/listdir.c @@ -32,7 +32,7 @@ void list_dir(const char* path) rt_memset(&s, 0, sizeof(struct stat));
/* build full path for each file */
- rt_sprintf(fullpath, "/%s", dirent->d_name);
+ rt_sprintf(fullpath, "%s/%s", path, dirent->d_name);
stat(fullpath, &s);
if ( s.st_mode & DFS_S_IFDIR )
|
