mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #4186 from geky/fs-dot-entries
Filesystem: Include '.' and '..' in directory iterationpull/4274/head
commit
e2469ecbba
|
@ -116,7 +116,13 @@ void test_read_dir() {
|
|||
while ((de = readdir(&dir))) {
|
||||
printf("d_name: %.32s, d_type: %x\n", de->d_name, de->d_type);
|
||||
|
||||
if (strcmp(de->d_name, "test_dir") == 0) {
|
||||
if (strcmp(de->d_name, ".") == 0) {
|
||||
test_dir_found = true;
|
||||
TEST_ASSERT_EQUAL(DT_DIR, de->d_type);
|
||||
} else if (strcmp(de->d_name, "..") == 0) {
|
||||
test_dir_found = true;
|
||||
TEST_ASSERT_EQUAL(DT_DIR, de->d_type);
|
||||
} else if (strcmp(de->d_name, "test_dir") == 0) {
|
||||
test_dir_found = true;
|
||||
TEST_ASSERT_EQUAL(DT_DIR, de->d_type);
|
||||
} else if (strcmp(de->d_name, "test_file") == 0) {
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
/ When _LFN_UNICODE is 0, this option has no effect. */
|
||||
|
||||
|
||||
#define _FS_RPATH 0
|
||||
#define _FS_RPATH 1
|
||||
/* This option configures relative path feature.
|
||||
/
|
||||
/ 0: Disable relative path feature and remove related functions.
|
||||
|
|
Loading…
Reference in New Issue