Fix large file support that broke due to a refactor.

This commit is contained in:
Tim Keller 2021-11-21 06:33:24 +00:00
parent d1e9aa1076
commit b9a2db1a49

View File

@ -176,7 +176,7 @@ int FSService::FSCommandHandler(uint16_t connectionHandle, os_mbuf* om) {
int res = 0;
if (!(res = fs.FileOpen(&f, filepath, LFS_O_RDWR | LFS_O_CREAT))) {
if (!(res = fs.FileSeek(&f, header->offset))) {
if ((res = fs.FileSeek(&f, header->offset) ) >= 0) {
res = fs.FileWrite(&f, header->data, header->dataSize);
}
fs.FileClose(&f);