0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.2478: MS-Windows: backup files for plugins are loaded

Problem:    MS-Windows: backup files for plugins are loaded.
Solution:   Do not use the alternate file name for files ending in "~".
This commit is contained in:
Bram Moolenaar
2021-02-07 14:01:35 +01:00
parent dd07c02232
commit 0dc5f603e9
2 changed files with 6 additions and 1 deletions

View File

@@ -3360,7 +3360,10 @@ dos_expandpath(
if (p == NULL) if (p == NULL)
break; // out of memory break; // out of memory
if (*wfb.cAlternateFileName == NUL) // Do not use the alternate filename when the file name ends in '~',
// because it picks up backup files: short name for "foo.vim~" is
// "foo~1.vim", which matches "*.vim".
if (*wfb.cAlternateFileName == NUL || p[STRLEN(p) - 1] == '~')
p_alt = NULL; p_alt = NULL;
else else
p_alt = utf16_to_enc(wfb.cAlternateFileName, NULL); p_alt = utf16_to_enc(wfb.cAlternateFileName, NULL);

View File

@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
2478,
/**/ /**/
2477, 2477,
/**/ /**/