revert erroneous change
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4000 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
ad64cd97b8
commit
26b3ead8d2
40
src/files.c
40
src/files.c
|
@ -1906,31 +1906,33 @@ int do_writeout(bool exiting)
|
||||||
if (full_answer != NULL)
|
if (full_answer != NULL)
|
||||||
free(full_answer);
|
free(full_answer);
|
||||||
|
|
||||||
if (name_exists) {
|
if (different_name) {
|
||||||
/* If we're using restricted mode, we aren't allowed
|
if (name_exists) {
|
||||||
* to save a new file under the name of an existing
|
/* If we're using restricted mode, we aren't
|
||||||
* file. */
|
* allowed to save a new file under the name of
|
||||||
if (ISSET(RESTRICTED))
|
* an existing file. */
|
||||||
continue;
|
if (ISSET(RESTRICTED))
|
||||||
|
continue;
|
||||||
|
|
||||||
i = do_yesno_prompt(FALSE,
|
i = do_yesno_prompt(FALSE,
|
||||||
_("File exists, OVERWRITE ? "));
|
_("File exists, OVERWRITE ? "));
|
||||||
if (i == 0 || i == -1)
|
if (i == 0 || i == -1)
|
||||||
continue;
|
continue;
|
||||||
/* If we're using restricted mode, we aren't allowed to
|
/* If we're using restricted mode, we aren't allowed
|
||||||
* change the name of a file once it has one, because
|
* to change the name of a file once it has one,
|
||||||
* that would allow reading from or writing to files not
|
* because that would allow reading from or writing
|
||||||
* specified on the command line. */
|
* to files not specified on the command line. */
|
||||||
} else if (different_name && !ISSET(RESTRICTED) &&
|
} else if (!ISSET(RESTRICTED) &&
|
||||||
openfile->filename[0] != '\0'
|
openfile->filename[0] != '\0'
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
&& (exiting || !openfile->mark_set)
|
&& (exiting || !openfile->mark_set)
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
i = do_yesno_prompt(FALSE,
|
i = do_yesno_prompt(FALSE,
|
||||||
_("Save file under DIFFERENT NAME ? "));
|
_("Save file under DIFFERENT NAME ? "));
|
||||||
if (i == 0 || i == -1)
|
if (i == 0 || i == -1)
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue