mirror of
https://github.com/pellepl/spiffs.git
synced 2026-07-28 22:47:46 +00:00
Merge pull request #121 from sensslen/patch-1
set file offset when seeking over end
This commit is contained in:
@@ -589,6 +589,7 @@ s32_t SPIFFS_lseek(spiffs *fs, spiffs_file fh, s32_t offs, int whence) {
|
||||
}
|
||||
|
||||
if ((offs > fileSize)) {
|
||||
fd->fdoffset = fileSize;
|
||||
res = SPIFFS_ERR_END_OF_OBJECT;
|
||||
}
|
||||
SPIFFS_API_CHECK_RES_UNLOCK(fs, res);
|
||||
|
||||
Reference in New Issue
Block a user