Skip to content

Commit 5f82d67

Browse files
committed
Fix FS::File::flush() on SD card.
espressif/arduino-esp32#1293
1 parent 4e3b4cb commit 5f82d67

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: libraries/FS/src/vfs_api.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,9 @@ void VFSFileImpl::flush()
340340
return;
341341
}
342342
fflush(_f);
343+
344+
// workaround for https://github.com/espressif/arduino-esp32/issues/1293
345+
fsync(fileno(_f));
343346
}
344347

345348
bool VFSFileImpl::seek(uint32_t pos, SeekMode mode)

0 commit comments

Comments
 (0)