mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
I/O: ignore ENOTSUP for failed fsync()
Suggested by ZyX in https://github.com/neovim/neovim/issues/6725#issuecomment-312197691 : > There already is an exception if writing to a “device” (e.g. FIFO). > It makes sense to ignore certain errors like ENOTSUP or EOPNOTSUPP > since it is not something we or user can do anything about. ref #6725
This commit is contained in:
@@ -3405,7 +3405,9 @@ restore_backup:
|
||||
// (could be a pipe).
|
||||
// If the 'fsync' option is FALSE, don't fsync(). Useful for laptops.
|
||||
int error;
|
||||
if (p_fs && (error = os_fsync(fd)) != 0 && !device) {
|
||||
if (p_fs && (error = os_fsync(fd)) != 0 && !device
|
||||
// fsync not supported on this storage.
|
||||
&& error != UV_ENOTSUP) {
|
||||
SET_ERRMSG_ARG(_("E667: Fsync failed: %s"), error);
|
||||
end = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user