diff --git a/src/files.c b/src/files.c index a9d833bd..a0ccfbc8 100644 --- a/src/files.c +++ b/src/files.c @@ -1953,8 +1953,9 @@ bool write_file(const char *name, FILE *thefile, bool tmp, unlink(tempname); } -#endif + if (!S_ISFIFO(st.st_mode)) +#endif /* Ensure the data has reached the disk before reporting it as written. */ if (fflush(thefile) != 0 || fsync(fileno(thefile)) != 0) { statusline(ALERT, _("Error writing %s: %s"), realname, strerror(errno));