Skip to content
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

FatFs' VFS unlink implementation does not adhere to POSIX (IDFGH-14405) #15187

Open
3 tasks done
Aric5301 opened this issue Jan 11, 2025 · 0 comments
Open
3 tasks done
Assignees
Labels
Status: Opened Issue is new

Comments

@Aric5301
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

Hi.
I've discovered that VFS' implementation of the FatFs file system uses FatFs' implementation of the unlink function as the unlink function implementation.
The problem is that FatFs' unlink function does not support removing a currently open file.
This is contrary to the definition of the POSIX unlink function, which allows it (this is the reason why it's called unlink).

I wasn't able to find any documentation for this discrepancy in ESP-IDF Programming Guide.
I think that it should be either properly documented (like the documentation added for explaining how the link function actually copies a file's content instead of just adding a second link), or it should be resolved in code by writing some special implementation of the unlink function.

Thanks!

@espressif-bot espressif-bot added the Status: Opened Issue is new label Jan 11, 2025
@github-actions github-actions bot changed the title FatFs' VFS unlink implementation does not adhere to POSIX FatFs' VFS unlink implementation does not adhere to POSIX (IDFGH-14405) Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Opened Issue is new
Projects
None yet
Development

No branches or pull requests

3 participants