mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
updated for version 7.4.006
Problem: mkdir("foo/bar/", "p") gives an error message. (David Barnett) Solution: Remove the trailing slash. (lcd)
This commit is contained in:
@@ -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
|
||||
|
||||
|
@@ -727,6 +727,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
6,
|
||||
/**/
|
||||
5,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user