]> granicus.if.org Git - vim/commitdiff
patch 7.4.885 v7.4.885
authorBram Moolenaar <Bram@vim.org>
Tue, 29 Sep 2015 10:08:42 +0000 (12:08 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 29 Sep 2015 10:08:42 +0000 (12:08 +0200)
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)

src/misc2.c
src/version.c

index 4f821178fbf6ce1dc2d9fee6cc7c424852f3e170..6ac1e5fa5f3535a355ee06fba908c7b555ae83c7 100644 (file)
@@ -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);
index 8d782620dbcc0b268aedf250884a90e6aac6dde6..f31f1bd1cb28913fefde952064e01cb02f7796d4 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    885,
 /**/
     884,
 /**/