summaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-05-19 14:59:10 +0200
committerBram Moolenaar <Bram@vim.org>2011-05-19 14:59:10 +0200
commit1385c3ee7f8715796c87d9bb020326ecc681e95d (patch)
treeb773bcfb2107c0ca149249c93b772116edfc7d19 /src/eval.c
parent9bd1a7ea28d102cca24901d6f16378441fa5245c (diff)
downloadvim-git-1385c3ee7f8715796c87d9bb020326ecc681e95d.tar.gz
updated for version 7.3.194v7.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)
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index db7b10638..64ed72ae0 100644
--- 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)