You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When SPIFFS_eof() called on just opened empty file, it returns 0.
Debugging shows that fd->size = 0xFFFFFFFF at here, looking abnormal for me.
When file opened with SPIFFS_APPEND, seeked to the middle and being written, calling SPIFFS_eof() returns 0 and calling SPIFFS_tell() returns value which would be in case if no SPIFFS_APPEND used.
The text was updated successfully, but these errors were encountered:
ArtemPisarenko
changed the title
SPIFFS_eof() returns wrong value
SPIFFS_eof() and SPIFFS_tell() return wrong value
Feb 29, 2016
Regarding length = 0xffffffff - this is valid for newly created files without content. Regard 0xffffffffff as 0. It is a minor optimization when actually writing something in the future. Instead of needing to allocate a new page,I just fill in the length. However, eof probably does not take this special case in account.
I remember I had to make something not so beautiful with file offsets when caches was created, I hope I can fix tell to be posix-compliant.
Two different cases.
Debugging shows that fd->size = 0xFFFFFFFF at here, looking abnormal for me.
The text was updated successfully, but these errors were encountered: