mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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'.
This commit is contained in:
14
src/fileio.c
14
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 == '<')
|
||||
{
|
||||
|
Reference in New Issue
Block a user