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:
@@ -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.
|
||||||
*/
|
*/
|
||||||
|
@@ -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));
|
||||||
|
@@ -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,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user