aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'config.c')
-rw-r--r--config.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/config.c b/config.c
index 526a3f429..0b0c9bd05 100644
--- a/config.c
+++ b/config.c
@@ -485,8 +485,9 @@ const char *git_etc_gitconfig(void)
if (!is_absolute_path(system_wide)) {
/* interpret path relative to exec-dir */
const char *exec_path = git_exec_path();
- system_wide = prefix_path(exec_path, strlen(exec_path),
- system_wide);
+ system_wide = strdup(prefix_filename(exec_path,
+ strlen(exec_path),
+ system_wide));
}
}
return system_wide;