Mercurial > emacs
changeset 107060:56607edb3cea
* fileio.c (Frename_file): Correctly rename symlinks to directories (Bug#5496).
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 30 Jan 2010 23:49:28 -0500 |
parents | 4ab5994c2846 |
children | fa65fbe23fdb bb5cb7ece094 |
files | src/ChangeLog src/fileio.c |
diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Sat Jan 30 23:29:06 2010 -0500 +++ b/src/ChangeLog Sat Jan 30 23:49:28 2010 -0500 @@ -1,3 +1,8 @@ +2010-01-31 David De La Harpe Golden <david@harpegolden.net> + + * fileio.c (Frename_file): Correctly rename symlinks to + directories (Bug#5496). + 2010-01-31 Filipe Cabecinhas <filcab@gmail.com> (tiny change) * nsterm.m (ns_ring_bell): Handle visible bell like X.
--- a/src/fileio.c Sat Jan 30 23:29:06 2010 -0500 +++ b/src/fileio.c Sat Jan 30 23:49:28 2010 -0500 @@ -2300,7 +2300,12 @@ 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);