Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion components/spiffs/esp_spiffs.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,15 @@ static int vfs_spiffs_readdir_r(void* ctx, DIR* pdir, struct dirent* entry,
char * item_name;
do {
if (SPIFFS_readdir(&dir->d, &out) == 0) {
errno = spiffs_res_to_errno(SPIFFS_errno(efs->fs));
s32_t spiffs_res = SPIFFS_errno(efs->fs);
switch (spiffs_res) {
case SPIFFS_ERR_END_OF_OBJECT:
errno = 0;
break;
default:
errno = spiffs_res_to_errno(spiffs_res);
break;
}
SPIFFS_clearerr(efs->fs);
if (!errno) {
*out_dirent = NULL;
Expand Down