From b9a2db1a49976cbfe92a9941bce17ffdbae7d0b3 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Sun, 21 Nov 2021 06:33:24 +0000 Subject: [PATCH] Fix large file support that broke due to a refactor. --- src/components/ble/FSService.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ble/FSService.cpp b/src/components/ble/FSService.cpp index 03d4673d..d82596cb 100644 --- a/src/components/ble/FSService.cpp +++ b/src/components/ble/FSService.cpp @@ -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);