Skip to content

Commit 0dc5f60

Browse files
committed
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 "~".
1 parent dd07c02 commit 0dc5f60

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/filepath.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3360,7 +3360,10 @@ dos_expandpath(
33603360
if (p == NULL)
33613361
break; // out of memory
33623362

3363-
if (*wfb.cAlternateFileName == NUL)
3363+
// Do not use the alternate filename when the file name ends in '~',
3364+
// because it picks up backup files: short name for "foo.vim~" is
3365+
// "foo~1.vim", which matches "*.vim".
3366+
if (*wfb.cAlternateFileName == NUL || p[STRLEN(p) - 1] == '~')
33643367
p_alt = NULL;
33653368
else
33663369
p_alt = utf16_to_enc(wfb.cAlternateFileName, NULL);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2478,
753755
/**/
754756
2477,
755757
/**/

0 commit comments

Comments
 (0)