summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-08-22 12:06:55 +0200
committerBram Moolenaar <Bram@vim.org>2013-08-22 12:06:55 +0200
commit67652c2935ce5a4313bb071f06b9fa476e10ef78 (patch)
tree5f696b6c24dafa09cdb9fcf9783d6bc0b5110ed7 /src
parentc56c459075260b4e7fb870ab4687b22222daec08 (diff)
downloadvim-67652c2935ce5a4313bb071f06b9fa476e10ef78.zip
updated for version 7.4.006
Problem: mkdir("foo/bar/", "p") gives an error message. (David Barnett) Solution: Remove the trailing slash. (lcd)
Diffstat (limited to 'src')
-rw-r--r--src/eval.c6
-rw-r--r--src/version.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index b9d739da0..58317d29b 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -14292,6 +14292,10 @@ f_mkdir(argvars, rettv)
return;
dir = get_tv_string_buf(&argvars[0], buf);
+ if (*gettail(dir) == NUL)
+ /* remove trailing slashes */
+ *gettail_sep(dir) = NUL;
+
if (argvars[1].v_type != VAR_UNKNOWN)
{
if (argvars[2].v_type != VAR_UNKNOWN)
@@ -14299,7 +14303,7 @@ f_mkdir(argvars, rettv)
if (prot != -1 && STRCMP(get_tv_string(&argvars[1]), "p") == 0)
mkdir_recurse(dir, prot);
}
- rettv->vval.v_number = prot != -1 ? vim_mkdir_emsg(dir, prot) : 0;
+ rettv->vval.v_number = prot == -1 ? FAIL : vim_mkdir_emsg(dir, prot);
}
#endif
diff --git a/src/version.c b/src/version.c
index ec2c2c000..77c3e8d57 100644
--- a/src/version.c
+++ b/src/version.c
@@ -728,6 +728,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 6,
+/**/
5,
/**/
4,