diff --git a/NEWS b/NEWS index 298aa2ca..12afca76 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -2020.05.23 - GNU nano 4.9.3 "Almendras" +s2020.05.23 - GNU nano 4.9.3 "Almendras" • One more bug introduced in version 4.9 is fixed: a crash when the terminal screen is resized while at a lock-file prompt. diff --git a/src/files.c b/src/files.c index 0fe94d73..41ee6570 100644 --- a/src/files.c +++ b/src/files.c @@ -1797,7 +1797,7 @@ bool write_file(const char *name, FILE *thefile, bool tmp, /* When the user requested a backup, we do this only if the file exists and * isn't temporary AND the file has not been modified by someone else since * we opened it (or we are appending/prepending or writing a selection). */ - if (is_existing_file && openfile->statinfo && + if (is_existing_file && !ISSET(RESTRICTED) && openfile->statinfo && (openfile->statinfo->st_mtime == st.st_mtime || method != OVERWRITE || openfile->mark)) { if (!backup_file(realname, &backupname))