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:
@@ -3360,7 +3360,10 @@ dos_expandpath(
|
||||
if (p == NULL)
|
||||
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;
|
||||
else
|
||||
p_alt = utf16_to_enc(wfb.cAlternateFileName, NULL);
|
||||
|
Reference in New Issue
Block a user