Skip to content

Commit 799c0f6

Browse files
authored
emulation on host: FS: minor reset fix (esp8266#7417)
1 parent b706fd4 commit 799c0f6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/host/common/littlefs_mock.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void LittleFSMock::load ()
9595
if (flen != (off_t)m_fs.size())
9696
{
9797
fprintf(stderr, "LittleFS: size of '%s': %d does not match requested size %zd\n", m_storage.c_str(), (int)flen, m_fs.size());
98-
if (!m_overwrite)
98+
if (!m_overwrite && flen > 0)
9999
{
100100
fprintf(stderr, "LittleFS: aborting at user request\n");
101101
exit(1);

tests/host/common/spiffs_mock.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void SpiffsMock::load ()
9494
if (flen != (off_t)m_fs.size())
9595
{
9696
fprintf(stderr, "SPIFFS: size of '%s': %d does not match requested size %zd\n", m_storage.c_str(), (int)flen, m_fs.size());
97-
if (!m_overwrite)
97+
if (!m_overwrite && flen > 0)
9898
{
9999
fprintf(stderr, "SPIFFS: aborting at user request\n");
100100
exit(1);

0 commit comments

Comments
 (0)