8000 unix: file: No fsync() on Windows. · tmbinc/micropython@dce8876 · GitHub
[go: up one dir, main page]

Skip to content

Commit dce8876

Browse files
committed
unix: file: No fsync() on Windows.
1 parent ac736f1 commit dce8876

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

unix/file.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,12 @@ STATIC mp_int_t fdfile_write(mp_obj_t o_in, const void *buf, mp_uint_t size, int
8383
}
8484

8585
STATIC mp_obj_t fdfile_flush(mp_obj_t self_in) {
86+
#ifndef _WIN32
8687
mp_obj_fdfile_t *self = self_in;
8788
fsync(self->fd);
89+
#else
90+
//TODO
91+
#endif
8892
return mp_const_none;
8993
}
9094
STATIC MP_DEFINE_CONST_FUN_OBJ_1(fdfile_flush_obj, fdfile_flush);

0 commit comments

Comments
 (0)
0