Mercurial > emacs
comparison src/fileio.c @ 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 | d876c40c06dd |
children | 9e578ef3e05c a387c138b28e 138ce2701550 |
comparison
equal
deleted
inserted
replaced
71425:a3a07d3fca53 | 71426:2414d21c77fa |
---|---|
2748 GCPRO5 (file, newname, encoded_file, encoded_newname, symlink_target); | 2748 GCPRO5 (file, newname, encoded_file, encoded_newname, symlink_target); |
2749 CHECK_STRING (file); | 2749 CHECK_STRING (file); |
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); |
2757 | 2763 |
2758 /* If the file name has special constructs in it, | 2764 /* If the file name has special constructs in it, |