patch 8.2.3509: undo file is not synced
Problem: Undo file is not synced. (Sami Farin)
Solution: Sync the undo file if 'fsync' is set. (Christian Brabandt,
closes #8879, closes #8920)
This commit is contained in:
@ -1786,6 +1786,11 @@ u_write_undo(
|
||||
write_ok = FALSE;
|
||||
#endif
|
||||
|
||||
#if defined(UNIX) && defined(HAVE_FSYNC)
|
||||
if (p_fs && fflush(fp) == 0 && vim_fsync(fd) != 0)
|
||||
write_ok = FALSE;
|
||||
#endif
|
||||
|
||||
write_error:
|
||||
fclose(fp);
|
||||
if (!write_ok)
|
||||
|
||||
Reference in New Issue
Block a user