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:
Tay Ray Chuan 2010-11-25 16:21:06 +08:00 committed by Junio C Hamano
parent 3793a30901
commit cf688cc273

View File

@ -510,9 +510,7 @@ static char* getdir(void)
die("GIT_PROJECT_ROOT is set but PATH_INFO is not");
if (daemon_avoid_alias(pathinfo))
die("'%s': aliased", pathinfo);
strbuf_addstr(&buf, root);
if (buf.buf[buf.len - 1] != '/')
strbuf_addch(&buf, '/');
end_url_with_slash(&buf, root);
if (pathinfo[0] == '/')
pathinfo++;
strbuf_addstr(&buf, pathinfo);