files: it is fine to "change" the name of a nameless buffer

This fixes https://savannah.gnu.org/bugs/?48156.
This commit is contained in:
Benno Schulenberg 2016-06-07 10:15:25 +02:00
parent f0c65bc988
commit 5dee9fb2c6

View File

@ -2216,7 +2216,7 @@ int do_writeout(bool exiting)
append_type append = OVERWRITE;
char *given;
/* The filename we offer, or what the user typed so far. */
bool maychange = FALSE;
bool maychange = (openfile->filename[0] == '\0');
/* Whether it's okay to save the file under a different name. */
#ifndef DISABLE_EXTRA
static bool did_credits = FALSE;