0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 7.4.1109

Problem:    MS-Windows doesn't have rmdir().
Solution:   Add mch_rmdir().
This commit is contained in:
Bram Moolenaar
2016-01-16 22:02:57 +01:00
parent 58adb14739
commit 4cf7679383
3 changed files with 27 additions and 0 deletions

View File

@@ -3153,6 +3153,30 @@ mch_mkdir(char_u *name)
return _mkdir(name); return _mkdir(name);
} }
/*
* Delete directory "name".
* Return 0 on success, -1 on error.
*/
int
mch_rmdir(char_u *name)
{
#ifdef FEAT_MBYTE
if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
{
WCHAR *p;
int retval;
p = enc_to_utf16(name, NULL);
if (p == NULL)
return -1;
retval = _wrmdir(p);
vim_free(p);
return retval;
}
#endif
return _rmdir(name);
}
/* /*
* Return TRUE if file "fname" has more than one link. * Return TRUE if file "fname" has more than one link.
*/ */

View File

@@ -22,6 +22,7 @@ void mch_hide __ARGS((char_u *name));
int mch_ishidden __ARGS((char_u *name)); int mch_ishidden __ARGS((char_u *name));
int mch_isdir __ARGS((char_u *name)); int mch_isdir __ARGS((char_u *name));
int mch_mkdir __ARGS((char_u *name)); int mch_mkdir __ARGS((char_u *name));
int mch_rmdir __ARGS((char_u *name));
int mch_is_hard_link __ARGS((char_u *fname)); int mch_is_hard_link __ARGS((char_u *fname));
int mch_is_symbolic_link __ARGS((char_u *fname)); int mch_is_symbolic_link __ARGS((char_u *fname));
int mch_is_linked __ARGS((char_u *fname)); int mch_is_linked __ARGS((char_u *fname));

View File

@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1109,
/**/ /**/
1108, 1108,
/**/ /**/