Added error code LFS_ERR_NOTEMPTY

As noted by itayzafrir, removing a non-empty directory should
error with ENOTEMPTY, not EINVAL
This commit is contained in:
Christopher Haster
2017-12-27 11:47:48 -06:00
parent c2fab8fabb
commit db8872781a
3 changed files with 16 additions and 15 deletions

2
lfs.c
View File

@@ -1740,7 +1740,7 @@ int lfs_remove(lfs_t *lfs, const char *path) {
if (err) {
return err;
} else if (dir.d.size != sizeof(dir.d)+4) {
return LFS_ERR_INVAL;
return LFS_ERR_NOTEMPTY;
}
}