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

Fix issue where seeking to end-of-directory return LFS_ERR_INVAL #805

Merged
merged 4 commits into from
Apr 26, 2023

Conversation

geky
Copy link
Member

@geky geky commented Apr 18, 2023

This was just an oversight. Seeking to the end of the directory should not error, but instead restore the directory to the state where the next read returns 0.

Note this matches the behavior of lfs_file_tell/lfs_file_seek.

Found by @sosthene-nitrokey, see #785 for more info.

sosthene-nitrokey and others added 3 commits March 13, 2023 11:39
This was just an oversight. Seeking to the end of the directory should
not error, but instead restore the directory to the state where the next
read returns 0.

Note this matches the behavior of lfs_file_tell/lfs_file_seek.

Found by sosthene-nitrokey
@sosthene-nitrokey
Copy link
Contributor

I can't speak for the fix itself but the tests appear to cover the case I describe in #785 and expect the same behaviour I would.

@geky geky changed the base branch from master to devel April 26, 2023 06:05
@geky geky merged commit dd03c27 into devel Apr 26, 2023
@geky geky mentioned this pull request May 1, 2023
yamt added a commit to yamt/toywasm that referenced this pull request Apr 30, 2024
seek to the eod is broken in old littlefs.
littlefs-project/littlefs#805
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants