|
|
22c937 |
To: vim_dev@googlegroups.com
|
|
|
22c937 |
Subject: Patch 7.4.006
|
|
|
22c937 |
Fcc: outbox
|
|
|
22c937 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
22c937 |
Mime-Version: 1.0
|
|
|
22c937 |
Content-Type: text/plain; charset=UTF-8
|
|
|
22c937 |
Content-Transfer-Encoding: 8bit
|
|
|
22c937 |
------------
|
|
|
22c937 |
|
|
|
22c937 |
Patch 7.4.006
|
|
|
22c937 |
Problem: mkdir("foo/bar/", "p") gives an error message. (David Barnett)
|
|
|
22c937 |
Solution: Remove the trailing slash. (lcd)
|
|
|
22c937 |
Files: src/eval.c
|
|
|
22c937 |
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.005/src/eval.c 2013-07-05 18:23:42.000000000 +0200
|
|
|
22c937 |
--- src/eval.c 2013-08-22 12:00:28.000000000 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 14292,14297 ****
|
|
|
22c937 |
--- 14292,14301 ----
|
|
|
22c937 |
return;
|
|
|
22c937 |
|
|
|
22c937 |
dir = get_tv_string_buf(&argvars[0], buf);
|
|
|
22c937 |
+ if (*gettail(dir) == NUL)
|
|
|
22c937 |
+ /* remove trailing slashes */
|
|
|
22c937 |
+ *gettail_sep(dir) = NUL;
|
|
|
22c937 |
+
|
|
|
22c937 |
if (argvars[1].v_type != VAR_UNKNOWN)
|
|
|
22c937 |
{
|
|
|
22c937 |
if (argvars[2].v_type != VAR_UNKNOWN)
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 14299,14305 ****
|
|
|
22c937 |
if (prot != -1 && STRCMP(get_tv_string(&argvars[1]), "p") == 0)
|
|
|
22c937 |
mkdir_recurse(dir, prot);
|
|
|
22c937 |
}
|
|
|
22c937 |
! rettv->vval.v_number = prot != -1 ? vim_mkdir_emsg(dir, prot) : 0;
|
|
|
22c937 |
}
|
|
|
22c937 |
#endif
|
|
|
22c937 |
|
|
|
22c937 |
--- 14303,14309 ----
|
|
|
22c937 |
if (prot != -1 && STRCMP(get_tv_string(&argvars[1]), "p") == 0)
|
|
|
22c937 |
mkdir_recurse(dir, prot);
|
|
|
22c937 |
}
|
|
|
22c937 |
! rettv->vval.v_number = prot == -1 ? FAIL : vim_mkdir_emsg(dir, prot);
|
|
|
22c937 |
}
|
|
|
22c937 |
#endif
|
|
|
22c937 |
|
|
|
22c937 |
*** ../vim-7.4.005/src/version.c 2013-08-14 17:45:25.000000000 +0200
|
|
|
22c937 |
--- src/version.c 2013-08-22 12:02:46.000000000 +0200
|
|
|
22c937 |
***************
|
|
|
22c937 |
*** 729,730 ****
|
|
|
22c937 |
--- 729,732 ----
|
|
|
22c937 |
{ /* Add new patch number below this line */
|
|
|
22c937 |
+ /**/
|
|
|
22c937 |
+ 6,
|
|
|
22c937 |
/**/
|
|
|
22c937 |
|
|
|
22c937 |
--
|
|
|
22c937 |
hundred-and-one symptoms of being an internet addict:
|
|
|
22c937 |
97. Your mother tells you to remember something, and you look for
|
|
|
22c937 |
a File/Save command.
|
|
|
22c937 |
|
|
|
22c937 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
22c937 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
22c937 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
22c937 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|