mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 7.4.885
Problem: When doing an upwards search without wildcards the search fails if the initial directory doesn't exist. Solution: Fix the non-wildcard case. (Stefan Kempf)
This commit is contained in:
23
src/misc2.c
23
src/misc2.c
@@ -4369,21 +4369,20 @@ vim_findfile_init(path, filename, stopdirs, level, free_visited, find_what,
|
||||
temp = alloc((int)(STRLEN(search_ctx->ffsc_wc_path)
|
||||
+ STRLEN(search_ctx->ffsc_fix_path + len)
|
||||
+ 1));
|
||||
}
|
||||
if (temp == NULL || wc_path == NULL)
|
||||
{
|
||||
vim_free(buf);
|
||||
vim_free(temp);
|
||||
vim_free(wc_path);
|
||||
goto error_return;
|
||||
}
|
||||
|
||||
if (temp == NULL || wc_path == NULL)
|
||||
{
|
||||
vim_free(buf);
|
||||
vim_free(temp);
|
||||
STRCPY(temp, search_ctx->ffsc_fix_path + len);
|
||||
STRCAT(temp, search_ctx->ffsc_wc_path);
|
||||
vim_free(search_ctx->ffsc_wc_path);
|
||||
vim_free(wc_path);
|
||||
goto error_return;
|
||||
search_ctx->ffsc_wc_path = temp;
|
||||
}
|
||||
|
||||
STRCPY(temp, search_ctx->ffsc_fix_path + len);
|
||||
STRCAT(temp, search_ctx->ffsc_wc_path);
|
||||
vim_free(search_ctx->ffsc_wc_path);
|
||||
vim_free(wc_path);
|
||||
search_ctx->ffsc_wc_path = temp;
|
||||
}
|
||||
#endif
|
||||
vim_free(buf);
|
||||
|
Reference in New Issue
Block a user