http-backend: use end_url_with_slash()
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
3793a30901
commit
cf688cc273
@ -510,9 +510,7 @@ static char* getdir(void)
|
|||||||
die("GIT_PROJECT_ROOT is set but PATH_INFO is not");
|
die("GIT_PROJECT_ROOT is set but PATH_INFO is not");
|
||||||
if (daemon_avoid_alias(pathinfo))
|
if (daemon_avoid_alias(pathinfo))
|
||||||
die("'%s': aliased", pathinfo);
|
die("'%s': aliased", pathinfo);
|
||||||
strbuf_addstr(&buf, root);
|
end_url_with_slash(&buf, root);
|
||||||
if (buf.buf[buf.len - 1] != '/')
|
|
||||||
strbuf_addch(&buf, '/');
|
|
||||||
if (pathinfo[0] == '/')
|
if (pathinfo[0] == '/')
|
||||||
pathinfo++;
|
pathinfo++;
|
||||||
strbuf_addstr(&buf, pathinfo);
|
strbuf_addstr(&buf, pathinfo);
|
||||||
|
Loading…
Reference in New Issue
Block a user