comparison src/os_win32.c @ 7619:6fed43c541c8 v7.4.1109

commit https://github.com/vim/vim/commit/4cf7679383dca81a4a351e2b0ec333c95d6d9085 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 16 22:02:57 2016 +0100 patch 7.4.1109 Problem: MS-Windows doesn't have rmdir(). Solution: Add mch_rmdir().
author Christian Brabandt <cb@256bit.org>
date Sat, 16 Jan 2016 22:15:04 +0100
parents 4456fa2d22e8
children 9c5e8254ea6b
comparison
equal deleted inserted replaced
7618:931fd6165c4d 7619:6fed43c541c8
3149 vim_free(p); 3149 vim_free(p);
3150 return retval; 3150 return retval;
3151 } 3151 }
3152 #endif 3152 #endif
3153 return _mkdir(name); 3153 return _mkdir(name);
3154 }
3155
3156 /*
3157 * Delete directory "name".
3158 * Return 0 on success, -1 on error.
3159 */
3160 int
3161 mch_rmdir(char_u *name)
3162 {
3163 #ifdef FEAT_MBYTE
3164 if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
3165 {
3166 WCHAR *p;
3167 int retval;
3168
3169 p = enc_to_utf16(name, NULL);
3170 if (p == NULL)
3171 return -1;
3172 retval = _wrmdir(p);
3173 vim_free(p);
3174 return retval;
3175 }
3176 #endif
3177 return _rmdir(name);
3154 } 3178 }
3155 3179
3156 /* 3180 /*
3157 * Return TRUE if file "fname" has more than one link. 3181 * Return TRUE if file "fname" has more than one link.
3158 */ 3182 */