From 67ee7c32e72ca6be40f3437316505dc208509c0d Mon Sep 17 00:00:00 2001 From: Clemens Kirchgatterer Date: Tue, 9 Apr 2019 21:15:21 +0200 Subject: [PATCH] workaround for FS implementations that do not support fflush() (#2596) https://github.com/espressif/arduino-esp32/issues/1293 --- libraries/FS/src/vfs_api.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/FS/src/vfs_api.cpp b/libraries/FS/src/vfs_api.cpp index 2b91eb82..6502f760 100644 --- a/libraries/FS/src/vfs_api.cpp +++ b/libraries/FS/src/vfs_api.cpp @@ -340,6 +340,8 @@ void VFSFileImpl::flush() return; } fflush(_f); + // workaround for https://github.com/espressif/arduino-esp32/issues/1293 + fsync(fileno(_f)); } bool VFSFileImpl::seek(uint32_t pos, SeekMode mode)