From aef40df1c432d51c5a75c9d94589a8e9577e0573 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 29 May 2019 18:53:44 +0200 Subject: Improve url::string() to handle empty scheme --- libbutl/url.txx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libbutl/url.txx b/libbutl/url.txx index 7e3fddb..3f07eb8 100644 --- a/libbutl/url.txx +++ b/libbutl/url.txx @@ -430,14 +430,18 @@ LIBBUTL_MODEXPORT namespace butl //@@ MOD Clang needs this for some reason. if (!u.empty ()) return u; - r += ':'; + if (!r.empty ()) + r += ':'; if (authority) { // We can't append '//' string literal, so appending characters. // - r += '/'; - r += '/'; + if (!r.empty ()) + { + r += '/'; + r += '/'; + } r += authority->string (); } -- cgit v1.1