aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Blandy1993-05-04 02:29:57 +0000
committerJim Blandy1993-05-04 02:29:57 +0000
commit9083124bb71c9db86e7ab2338b0aeb0dbbbb9a45 (patch)
tree599d32474cd4d03d2429c36c8c67c608afcb06c8
parent4b163808685487ad6d4fc1ebcdfb78c5c0969291 (diff)
downloademacs-9083124bb71c9db86e7ab2338b0aeb0dbbbb9a45.tar.gz
emacs-9083124bb71c9db86e7ab2338b0aeb0dbbbb9a45.zip
* fileio.c (Fmake_symbolic_link): If a file already exists under
the link's filename, delete the file which the link would replace, not the file the link would point at.
-rw-r--r--src/fileio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 563726d1265..7927a52d1b1 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1864,7 +1864,7 @@ This happens for interactive use with M-x.")
1864 /* If we didn't complain already, silently delete existing file. */ 1864 /* If we didn't complain already, silently delete existing file. */
1865 if (errno == EEXIST) 1865 if (errno == EEXIST)
1866 { 1866 {
1867 unlink (XSTRING (filename)->data); 1867 unlink (XSTRING (linkname)->data);
1868 if (0 <= symlink (XSTRING (filename)->data, XSTRING (linkname)->data)) 1868 if (0 <= symlink (XSTRING (filename)->data, XSTRING (linkname)->data))
1869 return Qnil; 1869 return Qnil;
1870 } 1870 }