From: Chong Yidong Date: Sun, 31 Jan 2010 04:49:28 +0000 (-0500) Subject: * fileio.c (Frename_file): Correctly rename symlinks to directories (Bug#5496). X-Git-Tag: emacs-pretest-23.1.93~134 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8fab23622f08c0ecc404b1c12ef9834eda4a7bb3;p=emacs.git * fileio.c (Frename_file): Correctly rename symlinks to directories (Bug#5496). --- 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);