fatfs: Fixed ENOTEMPTY error for removing a directory

pull/6336/head
Christopher Haster 2018-04-29 09:50:24 -05:00
parent 6d4190bd0b
commit 5efda4b922
1 changed files with 4 additions and 0 deletions

View File

@ -404,6 +404,10 @@ int FATFileSystem::remove(const char *path)
if (res != FR_OK) {
debug_if(FFS_DBG, "f_unlink() failed: %d\n", res);
if (res == FR_DENIED) {
printf("hi %d -> %d\n", FR_DENIED, -ENOTEMPTY);
return -ENOTEMPTY;
}
}
return fat_error_remap(res);
}