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");
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user