diff options
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/fileio.c b/src/fileio.c index b5a49b874..6e89b888c 100644 --- 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, sfname, tail, allow_dirs) 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 == '<') { |