From 5cf351913e6e9b23d0956b9affea4d36e32c1506 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 13 Jan 2020 19:51:37 +0100 Subject: [PATCH] files: warn doubly when the user is about to overwrite an existing file --- src/files.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/files.c b/src/files.c index fda9d978..5f796e55 100644 --- a/src/files.c +++ b/src/files.c @@ -306,6 +306,8 @@ int do_lockfile(const char *filename, bool ask_the_user) locking_prefix, basename(secondcopy), locking_suffix); if (!ask_the_user && stat(lockfilename, &fileinfo) != -1) { + blank_bottombars(); + lastmessage = HUSH; warn_and_shortly_pause(_("Someone else is also editing this file")); } else if (stat(lockfilename, &fileinfo) != -1) { size_t readtot = 0; @@ -2158,6 +2160,8 @@ int do_writeout(bool exiting, bool withprompt) sprintf(message, question, name); + blank_bottombars(); + warn_and_shortly_pause(_("File already exists")); choice = do_yesno_prompt(FALSE, message); free(message);