Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2013-08-05 22:41:39 +0400
committerBen Straub <bs@github.com>2013-08-05 22:41:39 +0400
commitd85636190f127efa2ec4a6593124c037dfec0ba9 (patch)
tree1c19c3cd463e69472d6d58cebd560d8ec025796e /src/path.c
parent9b7d02ff2d9b87d61778ee7ef5e2d43bf4c561f0 (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.c4
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) {