Commit 71e46403 authored by Chris Allegretta's avatar Chris Allegretta
Browse files

Line up link/unlink/rename check if conditional with top if conditional

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@387 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 21e3c28a
Showing with 4 additions and 1 deletion
+4 -1
...@@ -7,6 +7,9 @@ CVS code - ...@@ -7,6 +7,9 @@ CVS code -
- We now run check on result of lstat(), not stat(), to be - We now run check on result of lstat(), not stat(), to be
safer. New variable anyexists, we use still use realexists safer. New variable anyexists, we use still use realexists
later in the program. later in the program.
- OOPS, line up link/unlink/rename check if conditional with
top if conditional. Option -l has been broken for 9 versions,
no one noticed?!
- winio.c: - winio.c:
edit_add() edit_add()
- Off by one display error (fix by Rocco Corsi). - Off by one display error (fix by Rocco Corsi).
......
...@@ -431,7 +431,7 @@ int write_file(char *name, int tmp) ...@@ -431,7 +431,7 @@ int write_file(char *name, int tmp)
return -1; return -1;
} }
if (!ISSET(FOLLOW_SYMLINKS) || tmp) { if ((!ISSET(FOLLOW_SYMLINKS) && S_ISLNK(st.st_mode)) || tmp) {
if (realexists == -1) { if (realexists == -1) {
/* Use default umask as file permisions if file is a new file. */ /* Use default umask as file permisions if file is a new file. */
mask = umask(0); mask = umask(0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment