nano

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

commit bb3d367716561ad6cfa5e6599ce5ac6a8e33ac15
parent 26c0a7962e97bfc281decb3da7efa658254f2bca
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Tue, 28 Sep 2021 09:40:03 +0200

files: making a backup of a fifo makes no sense, so do not try that

This fixes https://savannah.gnu.org/bugs/?61235.

Bug existed since version 4.3, commit 1b2018e9,
since opening a fifo was made possible again.

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

diff --git a/src/files.c b/src/files.c @@ -1792,6 +1792,7 @@ bool write_file(const char *name, FILE *thefile, bool tmp, * isn't temporary AND the file has not been modified by someone else since * we opened it (or we are appending/prepending or writing a selection). */ if (ISSET(MAKE_BACKUP) && is_existing_file && openfile->statinfo && + !S_ISFIFO(st.st_mode) && (openfile->statinfo->st_mtime == st.st_mtime || method != OVERWRITE || openfile->mark)) { if (!make_backup_of(realname))