From 8fab23622f08c0ecc404b1c12ef9834eda4a7bb3 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 30 Jan 2010 23:49:28 -0500 Subject: [PATCH] * fileio.c (Frename_file): Correctly rename symlinks to directories (Bug#5496). --- src/ChangeLog | 5 +++++ src/fileio.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) 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); -- 2.39.5