Mercurial > emacs
changeset 71426:2414d21c77fa
(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.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 23 Jun 2006 10:19:11 +0000 |
parents | a3a07d3fca53 |
children | 2b086f630764 |
files | src/fileio.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);