workaround for FS implementations that do not support fflush() (#2596)

https://github.com/espressif/arduino-esp32/issues/1293
This commit is contained in:
Clemens Kirchgatterer 2019-04-09 21:15:21 +02:00 committed by Me No Dev
parent 8091c2cac7
commit 67ee7c32e7

View File

@ -340,6 +340,8 @@ void VFSFileImpl::flush()
return; return;
} }
fflush(_f); fflush(_f);
// workaround for https://github.com/espressif/arduino-esp32/issues/1293
fsync(fileno(_f));
} }
bool VFSFileImpl::seek(uint32_t pos, SeekMode mode) bool VFSFileImpl::seek(uint32_t pos, SeekMode mode)