mirror of
https://github.com/neovim/neovim.git
synced 2025-09-26 21:18:34 +00:00
vim-patch:8.1.1371: cannot recover from a swap file #11081
Problem: Cannot recover from a swap file.
Solution: Do not expand environment variables in the swap file name.
Do not check the extension when we already know a file is a swap
file. (Ken Takata, closes 4415, closes vim/vim#4369)
99499b1c05
This commit is contained in:

committed by
Justin M. Keyes

parent
1396cc9abb
commit
fe074611cd
@@ -5023,7 +5023,7 @@ void fix_help_buffer(void)
|
||||
copy_option_part(&p, NameBuff, MAXPATHL, ",");
|
||||
char_u *const rt = (char_u *)vim_getenv("VIMRUNTIME");
|
||||
if (rt != NULL
|
||||
&& path_full_compare(rt, NameBuff, false) != kEqualFiles) {
|
||||
&& path_full_compare(rt, NameBuff, false, true) != kEqualFiles) {
|
||||
int fcount;
|
||||
char_u **fnames;
|
||||
char_u *s;
|
||||
@@ -5233,7 +5233,7 @@ static void helptags_one(char_u *const dir, const char_u *const ext,
|
||||
ga_init(&ga, (int)sizeof(char_u *), 100);
|
||||
if (add_help_tags
|
||||
|| path_full_compare((char_u *)"$VIMRUNTIME/doc",
|
||||
dir, false) == kEqualFiles) {
|
||||
dir, false, true) == kEqualFiles) {
|
||||
s = xmalloc(18 + STRLEN(tagfname));
|
||||
sprintf((char *)s, "help-tags\t%s\t1\n", tagfname);
|
||||
GA_APPEND(char_u *, &ga, s);
|
||||
|
Reference in New Issue
Block a user