fileio.c (Frename_file): Put symlink handling inside #ifdef S_IFLNK.
This commit is contained in:
parent
c21c3d8966
commit
440c7d00c4
2 changed files with 7 additions and 4 deletions
|
@ -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>
|
||||
|
||||
|
|
10
src/fileio.c
10
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
|
||||
|
|
Loading…
Add table
Reference in a new issue