diff --git a/src/ChangeLog b/src/ChangeLog index 85d5ca3f025..f27aed26bef 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2010-01-31 David De La Harpe Golden + + * fileio.c (Frename_file): Correctly rename symlinks to + directories (Bug#5496). + 2010-01-31 Filipe Cabecinhas (tiny change) * nsterm.m (ns_ring_bell): Handle visible bell like X. diff --git a/src/fileio.c b/src/fileio.c index 72f695acb68..50f8cb14bfb 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2300,7 +2300,12 @@ This is what happens in interactive use with M-x. */) count = SPECPDL_INDEX (); specbind (Qdelete_by_moving_to_trash, Qnil); - if (!NILP (Ffile_directory_p (file))) + + if (!NILP (Ffile_directory_p (file)) +#ifdef S_IFLNK + && NILP (symlink_target) +#endif + ) call2 (Qdelete_directory, file, Qt); else Fdelete_file (file);