Mercurial > vim
diff src/fileio.c @ 4242:edd0bc1f26bd v7.3.872
updated for version 7.3.872
Problem: On some systems case of file names is always ignored, on others
never.
Solution: Add the 'fileignorecase' option to control this at runtime.
Implies 'wildignorecase'.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 19 Mar 2013 16:49:16 +0100 |
parents | 0fcb050fd79d |
children | dc3efb6d5a08 |
line wrap: on
line diff
--- a/src/fileio.c +++ b/src/fileio.c @@ -6485,9 +6485,7 @@ vim_rename(from, to) #ifdef HAVE_ACL vim_acl_T acl; /* ACL from original file */ #endif -#if defined(UNIX) || defined(CASE_INSENSITIVE_FILENAME) int use_tmp_file = FALSE; -#endif /* * When the names are identical, there is nothing to do. When they refer @@ -6496,11 +6494,9 @@ vim_rename(from, to) */ if (fnamecmp(from, to) == 0) { -#ifdef CASE_INSENSITIVE_FILENAME - if (STRCMP(gettail(from), gettail(to)) != 0) + if (p_fic && STRCMP(gettail(from), gettail(to)) != 0) use_tmp_file = TRUE; else -#endif return 0; } @@ -6539,7 +6535,6 @@ vim_rename(from, to) } #endif -#if defined(UNIX) || defined(CASE_INSENSITIVE_FILENAME) if (use_tmp_file) { char tempname[MAXPATHL + 1]; @@ -6572,7 +6567,6 @@ vim_rename(from, to) } return -1; } -#endif /* * Delete the "to" file, this is required on some systems to make the @@ -10007,11 +10001,7 @@ match_file_pat(pattern, prog, fname, sfn int match = FALSE; #endif -#ifdef CASE_INSENSITIVE_FILENAME - regmatch.rm_ic = TRUE; /* Always ignore case */ -#else - regmatch.rm_ic = FALSE; /* Don't ever ignore case */ -#endif + regmatch.rm_ic = p_fic; /* ignore case if 'fileignorecase' is set */ #ifdef FEAT_OSFILETYPE if (*pattern == '<') {