]> git.wh0rd.org Git - nano.git/commitdiff
yet more cosmetic fixes
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Tue, 7 Nov 2006 22:56:25 +0000 (22:56 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Tue, 7 Nov 2006 22:56:25 +0000 (22:56 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3941 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

src/files.c

index f08e828c49681d2362c3d670a94b213c9b9b1148..25c3362002ce23aebfcea1b10d0089f6ea2b9317 100644 (file)
@@ -1876,17 +1876,17 @@ int do_writeout(bool exiting)
                     * to save a new file under the name of an existing
                     * file.  In this case, show a "File exists"
                     * error. */
-                   if (!ISSET(RESTRICTED)) {
-                       i = do_yesno_prompt(FALSE,
-                               _("File exists, OVERWRITE ? "));
-                       if (i == 0 || i == -1)
-                           continue;
-                   } else {
+                   if (ISSET(RESTRICTED)) {
                        errno = EEXIST;
                        statusbar(_("Error writing %s: %s"), answer,
                                strerror(errno));
                        retval = -1;
                        break;
+                   } else {
+                       i = do_yesno_prompt(FALSE,
+                               _("File exists, OVERWRITE ? "));
+                       if (i == 0 || i == -1)
+                           continue;
                    }
                /* If we're using restricted mode, we aren't allowed to
                 * change the name of a file once it has one, because