nano

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

commit 1082f2adece1a84bbb1ae32b9c109f4f25757def
parent 042b8394a069b0b395a56312fdb6543a9d8ff216
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri, 18 Oct 2019 13:38:20 +0200

files: don't mention the name of the temp file when reading goes wrong

When writing a temp file goes wrong, its name is not mentioned either.

Diffstat:
Msrc/files.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/files.c b/src/files.c @@ -1855,7 +1855,7 @@ bool write_file(const char *name, FILE *stream, bool tmp, int verdict; if (source == NULL) { - statusline(ALERT, _("Error reading %s: %s"), tempname, + statusline(ALERT, _("Error reading temp file: %s"), strerror(errno)); fclose(thefile); goto cleanup_and_exit; @@ -1864,7 +1864,7 @@ bool write_file(const char *name, FILE *stream, bool tmp, verdict = copy_file(source, thefile, TRUE); if (verdict < 0) { - statusline(ALERT, _("Error reading %s: %s"), tempname, + statusline(ALERT, _("Error reading temp file: %s"), strerror(errno)); goto cleanup_and_exit; } else if (verdict > 0) {