From 100436dee92677c03556716c4b2c1f3e43bc9328 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 3 Mar 2018 17:46:09 +0200 Subject: Use butl::url::traits::find() to sens URLs --- bpkg/manifest-utility.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bpkg/manifest-utility.cxx') diff --git a/bpkg/manifest-utility.cxx b/bpkg/manifest-utility.cxx index 7b039c9..77baafb 100644 --- a/bpkg/manifest-utility.cxx +++ b/bpkg/manifest-utility.cxx @@ -4,6 +4,7 @@ #include +#include #include #include @@ -148,10 +149,10 @@ namespace bpkg { size_t p (s.find (':')); - // If it has no scheme or starts with the URL scheme (followed by :/) then - // this is not a canonical name. + // If it has no scheme or the scheme looks like that of a URL, then this + // is not a canonical name. // - if (p == string::npos || s[p + 1] == '/') + if (p == string::npos || butl::url::traits::find (s, p) != string::npos) return false; // This is a canonical name if the scheme is convertible to the repository -- cgit v1.1