Mercurial > emacs
comparison src/fileio.c @ 2650:f378d89945e1
* 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.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Tue, 04 May 1993 02:29:57 +0000 |
parents | fcf578723758 |
children | 1d72336294c6 |
comparison
equal
deleted
inserted
replaced
2649:3a9fb5d6d259 | 2650:f378d89945e1 |
---|---|
1862 if (0 > symlink (XSTRING (filename)->data, XSTRING (linkname)->data)) | 1862 if (0 > symlink (XSTRING (filename)->data, XSTRING (linkname)->data)) |
1863 { | 1863 { |
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 } |
1871 | 1871 |
1872 #ifdef NO_ARG_ARRAY | 1872 #ifdef NO_ARG_ARRAY |