diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-03-19 16:49:16 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-03-19 16:49:16 +0100 |
commit | 71afbfe6cd697de30a9e0d57e5a6434cf4bb0f13 (patch) | |
tree | 981f8a151ec2a29321c8ef579101f82403e6e38b /src/fileio.c | |
parent | db333a5b8d0c72b7342d6d65ad2895a19a1c29d2 (diff) | |
download | vim-git-71afbfe6cd697de30a9e0d57e5a6434cf4bb0f13.tar.gz |
updated for version 7.3.872v7.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'.
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 == '<') { |