diff options
author | Ben Straub <bs@github.com> | 2013-08-05 22:41:39 +0400 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2013-08-05 22:41:39 +0400 |
commit | d85636190f127efa2ec4a6593124c037dfec0ba9 (patch) | |
tree | 1c19c3cd463e69472d6d58cebd560d8ec025796e /src/path.c | |
parent | 9b7d02ff2d9b87d61778ee7ef5e2d43bf4c561f0 (diff) |
Split UTF-16 and UTF-8 buffer sizes for win32
Also fixed up call-sites to use the correct buffer sizes, especially
when converting to utf-8.
Diffstat (limited to 'src/path.c')
-rw-r--r-- | src/path.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/path.c b/src/path.c index 6437979d5..ca0cc8c7c 100644 --- a/src/path.c +++ b/src/path.c @@ -486,14 +486,14 @@ bool git_path_is_empty_dir(const char *path) { git_buf pathbuf = GIT_BUF_INIT; HANDLE hFind = INVALID_HANDLE_VALUE; - wchar_t wbuf[GIT_WIN_PATH]; + wchar_t wbuf[GIT_WIN_PATH_UTF16]; WIN32_FIND_DATAW ffd; bool retval = true; if (!git_path_isdir(path)) return false; git_buf_printf(&pathbuf, "%s\\*", path); - git__utf8_to_16(wbuf, GIT_WIN_PATH, git_buf_cstr(&pathbuf)); + git__utf8_to_16(wbuf, GIT_WIN_PATH_UTF16, git_buf_cstr(&pathbuf)); hFind = FindFirstFileW(wbuf, &ffd); if (INVALID_HANDLE_VALUE == hFind) { |