Skip to content

Commit 8378192

Browse files
committed
workaround for FS implementations that do not support fflush() (#2596)
espressif/arduino-esp32#1293
1 parent e6043de commit 8378192

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

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

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

0 commit comments

Comments
 (0)