summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-09-29 12:08:42 +0200
committerBram Moolenaar <Bram@vim.org>2015-09-29 12:08:42 +0200
commitc79a5452acd695238798947e40086f9823c400e7 (patch)
tree40e16832af4e827bb20eeaf65c05eb7204bc26c4
parentca63501fbcd1cf9c8aa9ff12c093c95b62a89ed7 (diff)
downloadvim-git-c79a5452acd695238798947e40086f9823c400e7.tar.gz
patch 7.4.885v7.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)
-rw-r--r--src/misc2.c23
-rw-r--r--src/version.c2
2 files changed, 13 insertions, 12 deletions
diff --git a/src/misc2.c b/src/misc2.c
index 4f821178f..6ac1e5fa5 100644
--- a/src/misc2.c
+++ b/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);
diff --git a/src/version.c b/src/version.c
index 8d782620d..f31f1bd1c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 885,
+/**/
884,
/**/
883,