diff src/misc2.c @ 5116:6cabac58f26f v7.3.1301

updated for version 7.3.1301 Problem: Some tests fail on MS-Windows. Solution: Fix path separators in test 89 and 96. Omit test 97, escaping works differently. Make findfile() work on MS-Windows.
author Bram Moolenaar <bram@vim.org>
date Wed, 03 Jul 2013 21:19:07 +0200
parents dafd77a15d44
children 6f24376028af
line wrap: on
line diff
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -4693,14 +4693,14 @@ vim_findfile_init(path, filename, stopdi
 #ifdef FEAT_PATH_EXTRA
 	else
 	{
-	    char_u *p =  vim_strrchr(search_ctx->ffsc_fix_path, PATHSEP);
+	    char_u *p =  gettail(search_ctx->ffsc_fix_path);
 	    char_u *wc_path = NUL;
 	    char_u *temp = NUL;
 	    int    len = 0;
 
-	    if (p != NULL)
+	    if (p > search_ctx->ffsc_fix_path)
 	    {
-		len = p - search_ctx->ffsc_fix_path;
+		len = p - search_ctx->ffsc_fix_path - 1;
 		STRNCAT(ff_expand_buffer, search_ctx->ffsc_fix_path, len);
 		add_pathsep(ff_expand_buffer);
 	    }