Skip to content

Conversation

earlephilhower
Copy link
Collaborator

Fixes #7323

While I'm not a fan, the Arduino FileSeek API online shows that a seek()
past EOF should return FALSE.
https://www.arduino.cc/en/Reference/FileSeek

SPIFFS and SDFS obey this, but LittleFS followed the POSIX standard of
allowing seeks past EOF.

Update LittleFS::seek() to follow the Arduino API and add tests for it.

Fixes esp8266#7323

While I'm not a fan, the Arduino FileSeek API online shows that a seek()
past EOF should return FALSE.
https://www.arduino.cc/en/Reference/FileSeek

SPIFFS and SDFS obey this, but LittleFS followed the POSIX standard or
allowing seeks past EOF.

Update LittleFS::seek() to follow the Arduino API and add tests for it.
@earlephilhower earlephilhower added this to the 2.7.2 milestone May 24, 2020
@earlephilhower earlephilhower requested a review from devyte May 26, 2020 21:49
@earlephilhower earlephilhower merged commit 8ee67ab into esp8266:master May 31, 2020
@earlephilhower earlephilhower deleted the lfsseek branch May 31, 2020 04:47
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.

file.seek problem
2 participants