Skip to content

remove non empty directory returns inconsistent error codes between LittleFS & FatFS #5653

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
itayzafrir opened this issue Dec 5, 2017 · 4 comments
Assignees

Comments

@itayzafrir
Copy link
Contributor

Attempting to remove/delete a non-empty directory from the FS returns different error codes when using FatFS vs LittleFS

  • Type: Bug
  • Priority: Major

Bug

Target
K64F

Toolchain:
GCC_ARM

Expected behavior
The same error code will be returned for both file systems

Actual behavior
When trying to remove a non-empty directory using FatFS: error code = EACCES
When trying to remove a non-empty directory using LittleFS: error code = EINVAL

Steps to reproduce
remove a non empty directory using FatFS and then using LittleFS

@geky

@geky
Copy link
Contributor

geky commented Dec 5, 2017

Thanks for reporting this issue. According to Open Group, this should actually be ENOTEMPTY.

@geky
Copy link
Contributor

geky commented Apr 29, 2018

Ok, I added a patch to #6336 that should take care of this for FAT. LittleFS was updated in #6179 to use ENOTEMPTY.

So this looks like it should be solved soon, let me know if you have any concerns.

@ciarmcom
Copy link
Member

ARM Internal Ref: MBOTRIAGE-794

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 21, 2018

Thanks @geky. This should be resolved in 5.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants