changeset 2841:664c1adcb909 v7.3.194

updated for version 7.3.194 Problem: When "b" is a symlink to directory "a", resolve("b/") doesn't result in "a/". (ZyX) Solution: Remove the trailing slash. (Jean-Rene David)
author Bram Moolenaar <bram@vim.org>
date Thu, 19 May 2011 14:59:10 +0200
parents 59a62e01469a
children d26e38796007
files src/eval.c src/version.c
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -14980,7 +14980,10 @@ f_resolve(argvars, rettv)
 
 	len = STRLEN(p);
 	if (len > 0 && after_pathsep(p, p + len))
+	{
 	    has_trailing_pathsep = TRUE;
+	    p[len - 1] = NUL; /* the trailing slash breaks readlink() */
+	}
 
 	q = getnextcomp(p);
 	if (*q != NUL)
--- a/src/version.c
+++ b/src/version.c
@@ -710,6 +710,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    194,
+/**/
     193,
 /**/
     192,