# HG changeset patch # User Eli Zaretskii # Date 1151057951 0 # Node ID 2414d21c77fa39debc3c46faa9f7893145ba7ebf # Parent a3a07d3fca5357e8e08186ae50dc6277083df2ba (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 -r a3a07d3fca53 -r 2414d21c77fa src/fileio.c --- a/src/fileio.c Thu Jun 22 18:07:55 2006 +0000 +++ b/src/fileio.c Fri Jun 23 10:19:11 2006 +0000 @@ -2750,7 +2750,13 @@ 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);