diff options
author | Ben Straub <bs@github.com> | 2013-08-08 19:48:57 +0400 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2013-08-08 19:48:57 +0400 |
commit | aaefbdeea205fbea2005113a9743c81721a42b36 (patch) | |
tree | 8054ef69384be26ce48c6f6d8c8fbfc947eeb445 /tests-clar/clar_libgit2.c | |
parent | 2c0128ee79243d32e60f19e60acc2e297c1761d6 (diff) |
Discriminate path-specific and general UTF-X conversions
Diffstat (limited to 'tests-clar/clar_libgit2.c')
-rw-r--r-- | tests-clar/clar_libgit2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests-clar/clar_libgit2.c b/tests-clar/clar_libgit2.c index ebd034a08..6c741accd 100644 --- a/tests-clar/clar_libgit2.c +++ b/tests-clar/clar_libgit2.c @@ -61,7 +61,7 @@ char *cl_getenv(const char *name) wchar_t *value_utf16; char *value_utf8; - git__utf8_to_16(name_utf16, name); + git__win32_path_utf8_to_16(name_utf16, name); alloc_len = GetEnvironmentVariableW(name_utf16, NULL, 0); if (alloc_len <= 0) return NULL; @@ -72,7 +72,7 @@ char *cl_getenv(const char *name) GetEnvironmentVariableW(name_utf16, value_utf16, alloc_len); cl_assert(value_utf8 = git__malloc(alloc_len)); - git__utf16_to_8(value_utf8, value_utf16); + git__win32_path_utf16_to_8(value_utf8, value_utf16); git__free(value_utf16); @@ -84,10 +84,10 @@ int cl_setenv(const char *name, const char *value) git_win32_path_utf16 name_utf16; git_win32_path_utf16 value_utf16; - git__utf8_to_16(name_utf16, name); + git__win32_path_utf8_to_16(name_utf16, name); if (value) { - git__utf8_to_16(value_utf16, value); + git__win32_path_utf8_to_16(value_utf16, value); cl_assert(SetEnvironmentVariableW(name_utf16, value_utf16)); } else { /* Windows XP returns 0 (failed) when passing NULL for lpValue when @@ -111,8 +111,8 @@ int cl_rename(const char *source, const char *dest) git_win32_path_utf16 dest_utf16; unsigned retries = 1; - git__utf8_to_16(source_utf16, source); - git__utf8_to_16(dest_utf16, dest); + git__win32_path_utf8_to_16(source_utf16, source); + git__win32_path_utf8_to_16(dest_utf16, dest); while (!MoveFileW(source_utf16, dest_utf16)) { /* Only retry if the error is ERROR_ACCESS_DENIED; |