From 8455251c352952f5b3d300bb1718b910792df3cd Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 13 Jan 2020 21:42:44 +0100 Subject: [PATCH] files: revert the previous commit, as the extra warning is annoying It also erroneously left the succeeding prompt on the screen. This fixes https://savannah.gnu.org/bugs/?57593. --- src/files.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/files.c b/src/files.c index 5f796e55..6b8c992a 100644 --- a/src/files.c +++ b/src/files.c @@ -305,11 +305,9 @@ int do_lockfile(const char *filename, bool ask_the_user) snprintf(lockfilename, locknamesize, "%s/%s%s%s", dirname(namecopy), locking_prefix, basename(secondcopy), locking_suffix); - if (!ask_the_user && stat(lockfilename, &fileinfo) != -1) { - blank_bottombars(); - lastmessage = HUSH; + if (!ask_the_user && stat(lockfilename, &fileinfo) != -1) warn_and_shortly_pause(_("Someone else is also editing this file")); - } else if (stat(lockfilename, &fileinfo) != -1) { + else if (stat(lockfilename, &fileinfo) != -1) { size_t readtot = 0; size_t readamt = 0; char *lockbuf, *question, *pidstring, *postedname, *promptstr; @@ -2160,8 +2158,6 @@ 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);