aboutsummaryrefslogtreecommitdiff
path: root/loader/loader.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-11-14 16:29:22 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-11-16 16:42:35 +0200
commit03905bcf1bcfd9e7932fcac4283c5817058a25ce (patch)
treeb643d3bedf436bfcd8956b25133d5674b6b18e36 /loader/loader.cxx
parent96281a6c4f818311a6df90c0d8b8f537a61e1090 (diff)
Invent root path web interface configuration option
Diffstat (limited to 'loader/loader.cxx')
-rw-r--r--loader/loader.cxx14
1 files changed, 14 insertions, 0 deletions
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<repository>& 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);