diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 1 | ||||
| -rw-r--r-- | src/fileio.c | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9ff41a4ccc0..035aa78c24f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | * fileio.c (barf_or_query_if_file_exists): Use lstat. | 3 | * fileio.c (barf_or_query_if_file_exists): Use lstat. |
| 4 | (Frename_file): Handle renaming of symlinks across file systems. | 4 | (Frename_file): Handle renaming of symlinks across file systems. |
| 5 | (Frename_file): Put symlink handling inside #ifdef S_IFLNK. | ||
| 5 | 6 | ||
| 6 | 2004-05-04 Kim F. Storm <storm@cua.dk> | 7 | 2004-05-04 Kim F. Storm <storm@cua.dk> |
| 7 | 8 | ||
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. */) | |||
| 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 |