diff options
| author | Eli Zaretskii | 2006-06-23 10:19:11 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2006-06-23 10:19:11 +0000 |
| commit | f83caf703ce7369ce4f697b18eced8e2d1e4670e (patch) | |
| tree | 38b64f147e46f4da0b5df04a8eb837e0d850e11b /src | |
| parent | a1a302fda8bb46c163efcad8e5e23bd9be374f2d (diff) | |
| download | emacs-f83caf703ce7369ce4f697b18eced8e2d1e4670e.tar.gz emacs-f83caf703ce7369ce4f697b18eced8e2d1e4670e.zip | |
(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')
| -rw-r--r-- | src/fileio.c | 8 |
1 files changed, 7 insertions, 1 deletions
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. */) | |||
| 2750 | CHECK_STRING (newname); | 2750 | CHECK_STRING (newname); |
| 2751 | file = Fexpand_file_name (file, Qnil); | 2751 | file = Fexpand_file_name (file, Qnil); |
| 2752 | 2752 | ||
| 2753 | if (!NILP (Ffile_directory_p (newname))) | 2753 | if ((!NILP (Ffile_directory_p (newname))) |
| 2754 | #ifdef DOS_NT | ||
| 2755 | /* If the file names are identical but for the case, | ||
| 2756 | don't attempt to move directory to itself. */ | ||
| 2757 | && (NILP (Fstring_equal (Fdowncase (file), Fdowncase (newname)))) | ||
| 2758 | #endif | ||
| 2759 | ) | ||
| 2754 | newname = Fexpand_file_name (Ffile_name_nondirectory (file), newname); | 2760 | newname = Fexpand_file_name (Ffile_name_nondirectory (file), newname); |
| 2755 | else | 2761 | else |
| 2756 | newname = Fexpand_file_name (newname, Qnil); | 2762 | newname = Fexpand_file_name (newname, Qnil); |