Mercurial > emacs
diff src/fileio.c @ 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 | 6e7738cc419f |
children | fddcde0a4c70 |
line wrap: on
line diff
--- 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);