Mercurial > emacs
comparison src/fileio.c @ 55368:3d05bc7b23b9
fileio.c (Frename_file): Put symlink handling inside #ifdef S_IFLNK.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Tue, 04 May 2004 19:23:31 +0000 |
parents | 1d5e786cd260 |
children | 626bc3834cd3 46882e012e30 |
comparison
equal
deleted
inserted
replaced
55367:be1730952e61 | 55368:3d05bc7b23b9 |
---|---|
2723 || 0 > unlink (SDATA (encoded_file))) | 2723 || 0 > unlink (SDATA (encoded_file))) |
2724 #endif | 2724 #endif |
2725 { | 2725 { |
2726 if (errno == EXDEV) | 2726 if (errno == EXDEV) |
2727 { | 2727 { |
2728 #ifdef S_IFLNK | |
2728 symlink_target = Ffile_symlink_p (file); | 2729 symlink_target = Ffile_symlink_p (file); |
2729 if (NILP (symlink_target)) | 2730 if (! NILP (symlink_target)) |
2731 Fmake_symbolic_link (symlink_target, newname, | |
2732 NILP (ok_if_already_exists) ? Qnil : Qt, Qt); | |
2733 else | |
2734 #endif | |
2730 Fcopy_file (file, newname, | 2735 Fcopy_file (file, newname, |
2731 /* We have already prompted if it was an integer, | 2736 /* We have already prompted if it was an integer, |
2732 so don't have copy-file prompt again. */ | 2737 so don't have copy-file prompt again. */ |
2733 NILP (ok_if_already_exists) ? Qnil : Qt, Qt); | 2738 NILP (ok_if_already_exists) ? Qnil : Qt, Qt); |
2734 else | |
2735 Fmake_symbolic_link (symlink_target, newname, | |
2736 NILP (ok_if_already_exists) ? Qnil : Qt, Qt); | |
2737 Fdelete_file (file); | 2739 Fdelete_file (file); |
2738 } | 2740 } |
2739 else | 2741 else |
2740 #ifdef NO_ARG_ARRAY | 2742 #ifdef NO_ARG_ARRAY |
2741 { | 2743 { |