X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=http-backend.c;h=85015048dd466fb2f2afe12086379ecf579d0a56;hb=ad5aeeded3295589b2573b143f754762a56f8f82;hp=14c90c2e84afd9997e1a6453f0065b3f59b32e57;hpb=af24059fa299f1656692f5807eddd3b30b5f3cfb;p=git.git diff --git a/http-backend.c b/http-backend.c index 14c90c2e8..85015048d 100644 --- a/http-backend.c +++ b/http-backend.c @@ -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);