aboutsummaryrefslogtreecommitdiffstats
path: root/src/fileio.c
diff options
context:
space:
mode:
authorEli Zaretskii <[email protected]>2006-06-23 10:19:11 +0000
committerEli Zaretskii <[email protected]>2006-06-23 10:19:11 +0000
commitf83caf703ce7369ce4f697b18eced8e2d1e4670e (patch)
tree38b64f147e46f4da0b5df04a8eb837e0d850e11b /src/fileio.c
parenta1a302fda8bb46c163efcad8e5e23bd9be374f2d (diff)
(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.
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index efad98298c..d109f03465 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);