aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/undo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index f4f97fd8ee..64c16ed192 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -1333,6 +1333,10 @@ void u_write_undo(const char *const name, const bool forceit, buf_T *const buf,
}
#endif
+ if (p_fs && fflush(fp) == 0 && os_fsync(fd) != 0) {
+ write_ok = false;
+ }
+
write_error:
fclose(fp);
if (!write_ok) {