diff --git a/features/TESTS/filesystem/fat_filesystem/main.cpp b/features/TESTS/filesystem/fat_filesystem/main.cpp index 5ef12fb471..45d393ffd9 100644 --- a/features/TESTS/filesystem/fat_filesystem/main.cpp +++ b/features/TESTS/filesystem/fat_filesystem/main.cpp @@ -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) { diff --git a/features/filesystem/fat/ChaN/ffconf.h b/features/filesystem/fat/ChaN/ffconf.h index 838e72ce00..f8da280725 100644 --- a/features/filesystem/fat/ChaN/ffconf.h +++ b/features/filesystem/fat/ChaN/ffconf.h @@ -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.