]> git.wh0rd.org Git - nano.git/commitdiff
revert erroneous change
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Sat, 21 Apr 2007 20:24:16 +0000 (20:24 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Sat, 21 Apr 2007 20:24:16 +0000 (20:24 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_2_0_branch/nano@4094 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

src/files.c

index 752d94ae7639db2ce91aa2c6b1038b4b65d937b5..adbd8e65789187dafd82939f9726c82574b37721 100644 (file)
@@ -1908,11 +1908,12 @@ bool do_writeout(bool exiting)
                full_filename = get_full_path(openfile->filename);
                name_exists = (stat((full_answer == NULL) ? answer :
                        full_answer, &st) != -1);
-               do_warning = (name_exists ||
-                       (openfile->filename[0] != '\0' &&
-                       strcmp((full_answer == NULL) ? answer :
-                       full_answer, (full_filename == NULL) ?
-                       openfile->filename : full_filename) != 0));
+               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);
 
                /* Convert nulls to newlines.  answer_len is the
                 * string's real length. */