From 03905bcf1bcfd9e7932fcac4283c5817058a25ce Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 14 Nov 2015 16:29:22 +0200 Subject: Invent root path web interface configuration option --- loader/loader.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'loader/loader.cxx') diff --git a/loader/loader.cxx b/loader/loader.cxx index ee3e5fa..e9f5566 100644 --- a/loader/loader.cxx +++ b/loader/loader.cxx @@ -426,6 +426,20 @@ load_repositories (const shared_ptr& rp, database& db) // rp->url = move (rm.url); + // @@ Should we throw if url is not available for external repository ? + // Can, basically, repository be available on the web but have no web + // interface associated ? + // + if (rp->url) + { + // Normalize web interface url adding trailing '/' if not present. + // + auto& u (*rp->url); + assert (!u.empty ()); + if (u.back () != '/') + u += '/'; + } + if (rp->internal) { rp->email = move (rm.email); -- cgit v1.1