[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nano-devel] [PATCH] history: do not prompt on exit errors
From: |
Mike Frysinger |
Subject: |
[Nano-devel] [PATCH] history: do not prompt on exit errors |
Date: |
Mon, 21 Dec 2015 23:07:58 -0500 |
Making the user hit enter when there's an error saving history state
at exit is pointless and annoying. Just notify the user and move on.
---
src/files.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/files.c b/src/files.c
index db41c60..a5a9c91 100644
--- a/src/files.c
+++ b/src/files.c
@@ -3077,7 +3077,7 @@ void save_history(void)
FILE *hist = fopen(nanohist, "wb");
if (hist == NULL)
- history_error(N_("Error writing %s: %s"), nanohist,
+ fprintf(stderr, N_("Error writing %s: %s"), nanohist,
strerror(errno));
else {
/* Make sure no one else can read from or write to the
@@ -3085,7 +3085,7 @@ void save_history(void)
chmod(nanohist, S_IRUSR | S_IWUSR);
if (!writehist(hist, searchage) || !writehist(hist, replaceage))
- history_error(N_("Error writing %s: %s"), nanohist,
+ fprintf(stderr, N_("Error writing %s: %s"), nanohist,
strerror(errno));
fclose(hist);
--
2.6.2
- [Nano-devel] [PATCH] history: do not prompt on exit errors,
Mike Frysinger <=