diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-07-09 17:32:04 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-07-09 17:32:04 +0300 |
commit | 1b192351dc0ef09423ee9a40d68bacc3137c9aec (patch) | |
tree | 9966cdfad17be2fcdc89d0773adb3cb577104f7b /libbpkg/manifest.cxx | |
parent | c5b2691bcb978802aba99b21d42c99d89f550982 (diff) |
Make repository_url(string) to throw invalid_argument for empty string
Diffstat (limited to 'libbpkg/manifest.cxx')
-rw-r--r-- | libbpkg/manifest.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libbpkg/manifest.cxx b/libbpkg/manifest.cxx index af2a889..c2d7eee 100644 --- a/libbpkg/manifest.cxx +++ b/libbpkg/manifest.cxx @@ -1923,10 +1923,12 @@ namespace bpkg return scheme_type::file; } - // Consider URL as a path if the URL parsing failed. + // Consider non-empty URL as a path if the URL parsing failed. If the URL + // is empty then leave the basic_url ctor to throw. // else if (scheme.empty ()) { + if (!url.empty ()) try { size_t p (url.find ('#')); |