aboutsummaryrefslogtreecommitdiff
path: root/bpkg/manifest-utility.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-03-03 17:46:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-03-03 17:46:09 +0200
commit100436dee92677c03556716c4b2c1f3e43bc9328 (patch)
tree74c9a976ec1a28878ac54d9b625c68d11b4b9576 /bpkg/manifest-utility.cxx
parent646767a35fb2b9b0e3f992a3092c761ea6e5e362 (diff)
Use butl::url::traits::find() to sens URLs
Diffstat (limited to 'bpkg/manifest-utility.cxx')
-rw-r--r--bpkg/manifest-utility.cxx7
1 files changed, 4 insertions, 3 deletions
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 <bpkg/manifest-utility.hxx>
+#include <libbutl/url.mxx>
#include <libbutl/sha256.mxx>
#include <bpkg/diagnostics.hxx>
@@ -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