mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -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);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user