simplify still more
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3947 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
d23dcc5a25
commit
89eb5a96fb
|
@ -1874,11 +1874,13 @@ int do_writeout(bool exiting)
|
||||||
bool different_name = (strcmp(full_answer,
|
bool different_name = (strcmp(full_answer,
|
||||||
full_filename) != 0);
|
full_filename) != 0);
|
||||||
struct stat st;
|
struct stat st;
|
||||||
bool name_exists = (stat(full_answer, &st) != -1);
|
bool name_exists;
|
||||||
|
|
||||||
free(full_filename);
|
free(full_filename);
|
||||||
free(full_answer);
|
free(full_answer);
|
||||||
|
|
||||||
|
name_exists = (stat(answer, &st) != -1);
|
||||||
|
|
||||||
if (different_name) {
|
if (different_name) {
|
||||||
if (name_exists) {
|
if (name_exists) {
|
||||||
/* If we're using restricted mode, we aren't
|
/* If we're using restricted mode, we aren't
|
||||||
|
|
Loading…
Reference in New Issue