use strbuf_add_absolute_path() to add absolute paths
Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
679eebe24d
commit
9610decf4d
@ -86,11 +86,7 @@ const char *git_exec_path(void)
|
|||||||
static void add_path(struct strbuf *out, const char *path)
|
static void add_path(struct strbuf *out, const char *path)
|
||||||
{
|
{
|
||||||
if (path && *path) {
|
if (path && *path) {
|
||||||
if (is_absolute_path(path))
|
strbuf_add_absolute_path(out, path);
|
||||||
strbuf_addstr(out, path);
|
|
||||||
else
|
|
||||||
strbuf_addstr(out, absolute_path(path));
|
|
||||||
|
|
||||||
strbuf_addch(out, PATH_SEP);
|
strbuf_addch(out, PATH_SEP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user