]> git.wh0rd.org Git - nano.git/commitdiff
Update comment in write_file
authorChris Allegretta <chrisa@asty.org>
Mon, 11 Dec 2000 02:47:13 +0000 (02:47 +0000)
committerChris Allegretta <chrisa@asty.org>
Mon, 11 Dec 2000 02:47:13 +0000 (02:47 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@406 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

files.c

diff --git a/files.c b/files.c
index de0930ae565f3c7c5ee1d3823b54e3862dd33bbf..fedba8816d242b3e421b24e928a4a4e2bcfefce6 100644 (file)
--- a/files.c
+++ b/files.c
@@ -332,7 +332,9 @@ int write_file(char *name, int tmp)
     if (tmp && anyexists != -1)
        return -1;
     /* NOTE: If you change this statement, you MUST CHANGE the if 
-       statement below (that starts "if ((!ISSET(FOLLOW_SYMLINKS)...")
+       statement below (that says:
+               if (realexists == -1 || tmp || (!ISSET(FOLLOW_SYMLINKS) &&
+               S_ISLNK(lst.st_mode))) {
        to reflect whether or not to link/unlink/rename the file */
     else if (ISSET(FOLLOW_SYMLINKS) || !S_ISLNK(lst.st_mode) || tmp) {
        /* Use O_EXCL if tmp == 1.  This is now copied from joe, because