diff options
Diffstat (limited to 'src/os_win32.c')
-rw-r--r-- | src/os_win32.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/os_win32.c b/src/os_win32.c index c5b23ca7d..a47ffaf18 100644 --- a/src/os_win32.c +++ b/src/os_win32.c @@ -3154,6 +3154,30 @@ mch_mkdir(char_u *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. */ int |