aboutsummaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
Diffstat (limited to 'compat')
-rw-r--r--compat/mingw.h1
-rw-r--r--compat/precompose_utf8.c7
2 files changed, 3 insertions, 5 deletions
diff --git a/compat/mingw.h b/compat/mingw.h
index 19d82de41..92cd728d3 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -344,6 +344,7 @@ static inline char *mingw_find_last_dir_sep(const char *path)
#define find_last_dir_sep mingw_find_last_dir_sep
#define PATH_SEP ';'
#define PRIuMAX "I64u"
+#define PRId64 "I64d"
void mingw_open_html(const char *path);
#define open_html mingw_open_html
diff --git a/compat/precompose_utf8.c b/compat/precompose_utf8.c
index 7980abd1a..95fe849e4 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);