files: warn more conspicuously when the file on disk has changed

This partially adresses https://savannah.gnu.org/bugs/?50998.
master
Benno Schulenberg 2017-06-27 21:55:47 +02:00
parent 580fa53aba
commit 139f9c2fe5
1 changed files with 2 additions and 0 deletions

View File

@ -2284,6 +2284,8 @@ int do_writeout(bool exiting)
openfile->current_stat->st_dev != st.st_dev || openfile->current_stat->st_dev != st.st_dev ||
openfile->current_stat->st_ino != st.st_ino)) { openfile->current_stat->st_ino != st.st_ino)) {
warn_and_shortly_pause(_("File on disk has changed"));
if (do_yesno_prompt(FALSE, _("File was modified since " if (do_yesno_prompt(FALSE, _("File was modified since "
"you opened it; continue saving? ")) < 1) "you opened it; continue saving? ")) < 1)
continue; continue;