diff options
| author | Edward Thomson <ethomson@microsoft.com> | 2015-05-01 11:27:44 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@microsoft.com> | 2015-05-01 12:31:47 -0400 |
| commit | be3f104967ad21e949f72ef10a6b5ec00795ffaa (patch) | |
| tree | 30a6218dbe548586f6e49cf784b4558ba83b1e02 /src/path.c | |
| parent | cd39e4e2f3cc27a2976c9a8e0058f9e32d1f1c8f (diff) | |
| download | libgit2-be3f104967ad21e949f72ef10a6b5ec00795ffaa.tar.gz | |
diriter: actually use iconv on mac
Diffstat (limited to 'src/path.c')
| -rw-r--r-- | src/path.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/path.c b/src/path.c index 5b9fb935e..df6762c3a 100644 --- a/src/path.c +++ b/src/path.c @@ -1263,7 +1263,7 @@ int git_path_diriter_init( #ifdef GIT_USE_ICONV if ((flags & GIT_PATH_DIR_PRECOMPOSE_UNICODE) != 0) - (void)git_path_iconv_init_precompose(&ic); + (void)git_path_iconv_init_precompose(&diriter->ic); #endif diriter->parent_len = diriter->path.size; @@ -1299,7 +1299,8 @@ int git_path_diriter_next(git_path_diriter *diriter) filename_len = strlen(filename); #ifdef GIT_USE_ICONV - if ((error = git_path_iconv(&diriter->ic, &filename, &filename_len)) < 0) + if ((diriter->flags & GIT_PATH_DIR_PRECOMPOSE_UNICODE) != 0 && + (error = git_path_iconv(&diriter->ic, (char **)&filename, &filename_len)) < 0) return error; #endif |
