diff options
| author | Vicent Martà <vicent@github.com> | 2012-09-04 14:19:24 -0700 |
|---|---|---|
| committer | Vicent Martà <vicent@github.com> | 2012-09-04 14:19:24 -0700 |
| commit | 4d3834038bd0aaef63d62c54900f6ddafec09515 (patch) | |
| tree | e1cc8e3bc55d73e3e00f876a220fcfc462938f60 /src/win32/posix.h | |
| parent | c9d223f0de390e8b28af7c7513d03340001c2580 (diff) | |
| parent | 0f4c61754bd123b3bee997b397187c9b813ca3e4 (diff) | |
| download | libgit2-4d3834038bd0aaef63d62c54900f6ddafec09515.tar.gz | |
Merge pull request #856 from libgit2/utf8-win
Windows: Perform UTF-8 path conversion on the Stack
Diffstat (limited to 'src/win32/posix.h')
| -rw-r--r-- | src/win32/posix.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/win32/posix.h b/src/win32/posix.h index 14caae418..da46cf514 100644 --- a/src/win32/posix.h +++ b/src/win32/posix.h @@ -21,13 +21,10 @@ GIT_INLINE(int) p_link(const char *old, const char *new) GIT_INLINE(int) p_mkdir(const char *path, mode_t mode) { - wchar_t* buf = gitwin_to_utf16(path); - int ret = _wmkdir(buf); - + wchar_t buf[GIT_WIN_PATH]; GIT_UNUSED(mode); - - git__free(buf); - return ret; + git__utf8_to_16(buf, GIT_WIN_PATH, path); + return _wmkdir(buf); } extern int p_unlink(const char *path); |
