summaryrefslogtreecommitdiff
path: root/compat/precompose_utf8.c
diff options
context:
space:
mode:
Diffstat (limited to 'compat/precompose_utf8.c')
-rw-r--r--compat/precompose_utf8.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/compat/precompose_utf8.c b/compat/precompose_utf8.c
index 7980abd1a7..95fe849e42 100644
--- a/compat/precompose_utf8.c
+++ b/compat/precompose_utf8.c
@@ -48,11 +48,8 @@ void probe_utf8_pathname_composition(char *path, int len)
if (output_fd >= 0) {
close(output_fd);
strcpy(path + len, auml_nfd);
- /* Indicate to the user, that we can configure it to true */
- if (!access(path, R_OK))
- git_config_set("core.precomposeunicode", "false");
- /* To be backward compatible, set precomposed_unicode to 0 */
- precomposed_unicode = 0;
+ precomposed_unicode = access(path, R_OK) ? 0 : 1;
+ git_config_set("core.precomposeunicode", precomposed_unicode ? "true" : "false");
strcpy(path + len, auml_nfc);
if (unlink(path))
die_errno(_("failed to unlink '%s'"), path);