]> git.wh0rd.org Git - nano.git/commitdiff
Okay, now write_file never trusts symlinks at all, no chance of spelling symlink...
authorChris Allegretta <chrisa@asty.org>
Sat, 2 Dec 2000 03:06:37 +0000 (03:06 +0000)
committerChris Allegretta <chrisa@asty.org>
Sat, 2 Dec 2000 03:06:37 +0000 (03:06 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@360 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

files.c
po/nano.pot

diff --git a/files.c b/files.c
index bed3cd314a16182341a9fd58f53ef95dd9fc2952..05d31d87ce703527206ce55ac8b7bcd1eecbeafa 100644 (file)
--- a/files.c
+++ b/files.c
@@ -327,7 +327,7 @@ int write_file(char *name, int tmp)
     lstat(realname, &st);
 
     /* Open the file and truncate it.  Trust the symlink. */
-    if ((ISSET(FOLLOW_SYMLINKS) || !S_ISLNK(st.st_mode)) && !tmp) {
+    if (!tmp && (ISSET(FOLLOW_SYMLINKS) || !S_ISLNK(st.st_mode))) {
 
        if ((fd = open(realname, O_WRONLY | O_CREAT | O_TRUNC,
                       S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH |
index 8b108fa4e48208bc4a10216a77f4c95bc8726f31..eeabc1c0ca0b6c9a2d9e16a3e3e92928e9ee4851 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2000-12-01 21:39-0500\n"
+"POT-Creation-Date: 2000-12-01 22:06-0500\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"