summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2004-05-04 19:23:31 +0000
committerJan Djärv <jan.h.d@swipnet.se>2004-05-04 19:23:31 +0000
commit13a98d57514f5baae6d323f4f9e00fbceec99629 (patch)
tree5483b8d0210b1c8f8972b66c277da41ab66a5397
parent688ded8da6be944a4620190d8e33eb57660955f1 (diff)
downloademacs-13a98d57514f5baae6d323f4f9e00fbceec99629.tar.gz
fileio.c (Frename_file): Put symlink handling inside #ifdef S_IFLNK.
-rw-r--r--src/ChangeLog1
-rw-r--r--src/fileio.c10
2 files changed, 7 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 2cc5fc4f9f3..5e15e9828da 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -2,6 +2,7 @@
* fileio.c (barf_or_query_if_file_exists): Use lstat.
(Frename_file): Handle renaming of symlinks across file systems.
+ (Frename_file): Put symlink handling inside #ifdef S_IFLNK.
2004-05-04 Kim F. Storm <storm@cua.dk>
diff --git a/src/fileio.c b/src/fileio.c
index 04068e25f89..7d20697b875 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2725,15 +2725,17 @@ This is what happens in interactive use with M-x. */)
{
if (errno == EXDEV)
{
+#ifdef S_IFLNK
symlink_target = Ffile_symlink_p (file);
- if (NILP (symlink_target))
+ if (! NILP (symlink_target))
+ Fmake_symbolic_link (symlink_target, newname,
+ NILP (ok_if_already_exists) ? Qnil : Qt, Qt);
+ else
+#endif
Fcopy_file (file, newname,
/* We have already prompted if it was an integer,
so don't have copy-file prompt again. */
NILP (ok_if_already_exists) ? Qnil : Qt, Qt);
- else
- Fmake_symbolic_link (symlink_target, newname,
- NILP (ok_if_already_exists) ? Qnil : Qt, Qt);
Fdelete_file (file);
}
else