X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=config.c;h=0b0c9bd050023e15d3f49623ea036894cb5c521a;hb=4f395eed33816be70181a818cbce4bb7235b83be;hp=526a3f4294fdce7e69f495df039cfcbfbb5e9955;hpb=105c21df14531bf2fd39e05b4c3a9aa31349da06;p=git.git 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;