From: Eli Zaretskii Date: Fri, 23 Jun 2006 10:19:11 +0000 (+0000) Subject: (Frename_file) [DOS_NT]: Don't try to move directory to itself on DOS_NT X-Git-Tag: emacs-pretest-22.0.90~1881 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f83caf703ce7369ce4f697b18eced8e2d1e4670e;p=emacs.git (Frename_file) [DOS_NT]: Don't try to move directory to itself on DOS_NT platforms, if the old and new names are identical but for the letter-case. --- diff --git a/src/fileio.c b/src/fileio.c index efad98298cf..d109f034652 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2750,7 +2750,13 @@ This is what happens in interactive use with M-x. */) CHECK_STRING (newname); file = Fexpand_file_name (file, Qnil); - if (!NILP (Ffile_directory_p (newname))) + if ((!NILP (Ffile_directory_p (newname))) +#ifdef DOS_NT + /* If the file names are identical but for the case, + don't attempt to move directory to itself. */ + && (NILP (Fstring_equal (Fdowncase (file), Fdowncase (newname)))) +#endif + ) newname = Fexpand_file_name (Ffile_name_nondirectory (file), newname); else newname = Fexpand_file_name (newname, Qnil);