0
0
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:
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);
}
/*
* 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.
*/