]> git.eshelyaron.com Git - emacs.git/commitdiff
* fileio.c (Frename_file): Correctly rename symlinks to directories (Bug#5496).
authorChong Yidong <cyd@stupidchicken.com>
Sun, 31 Jan 2010 04:49:28 +0000 (23:49 -0500)
committerChong Yidong <cyd@stupidchicken.com>
Sun, 31 Jan 2010 04:49:28 +0000 (23:49 -0500)
src/ChangeLog
src/fileio.c

index 85d5ca3f02549bd33a8a9b204b1936df73baab4c..f27aed26bef9ddd2006d4b90a4f5ed233ea1f249 100644 (file)
@@ -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.
index 72f695acb68983e1b17569bcec1d9b10a5adf904..50f8cb14bfb3bbb6bd29f656a183214acf26e29f 100644 (file)
@@ -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);