nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit b07fb5a811ebe407120846db1ee59a83d3efb327
parent 9ab49658d731e1506942cdf7c96ebd6a90858956
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Tue, 28 Sep 2021 10:57:50 +0200

files: exclude the call of fsync() from the tiny version

To avoid a spurious error message when the user chooses to write
the current buffer to a fifo.

Reported-by: André Kugland <kugland@gmail.com>
  https://lists.gnu.org/archive/html/nano-devel/2021-09/msg00031.html

Diffstat:
Msrc/files.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/files.c b/src/files.c @@ -1961,13 +1961,13 @@ bool write_file(const char *name, FILE *thefile, bool tmp, } if (!is_existing_file || !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)); fclose(thefile); goto cleanup_and_exit; } +#endif if (fclose(thefile) != 0) { statusline(ALERT, _("Error writing %s: %s"), realname, strerror(errno));