X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=http-backend.c;h=85015048dd466fb2f2afe12086379ecf579d0a56;hb=9971d6d52c5afeb8ba60ae6ddcffb34af23eeadd;hp=14c90c2e84afd9997e1a6453f0065b3f59b32e57;hpb=1253164c8badf75034b8ba7c1cfabb1993fa7cf7;p=thirdparty%2Fgit.git diff --git a/http-backend.c b/http-backend.c index 14c90c2e84..85015048dd 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);