aboutsummaryrefslogtreecommitdiff
path: root/loader/loader.cxx
diff options
context:
space:
mode:
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);