mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 12:51:23 +03:00
further simplify do_writeout()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4093 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
7622ca0456
commit
3468784b85
11
src/files.c
11
src/files.c
@ -1908,12 +1908,11 @@ bool do_writeout(bool exiting)
|
||||
full_filename = get_full_path(openfile->filename);
|
||||
name_exists = (stat((full_answer == NULL) ? answer :
|
||||
full_answer, &st) != -1);
|
||||
if (openfile->filename[0] == '\0')
|
||||
do_warning = name_exists;
|
||||
else
|
||||
do_warning = (strcmp((full_answer == NULL) ?
|
||||
answer : full_answer, (full_filename == NULL) ?
|
||||
openfile->filename : full_filename) != 0);
|
||||
do_warning = (name_exists ||
|
||||
(openfile->filename[0] != '\0' &&
|
||||
strcmp((full_answer == NULL) ? answer :
|
||||
full_answer, (full_filename == NULL) ?
|
||||
openfile->filename : full_filename) != 0));
|
||||
|
||||
/* Convert nulls to newlines. answer_len is the
|
||||
* string's real length. */
|
||||
|
Loading…
Reference in New Issue
Block a user