diff options
Diffstat (limited to 'bpkg')
-rw-r--r-- | bpkg/manifest-utility.cxx | 4 | ||||
-rw-r--r-- | bpkg/package.hxx | 6 | ||||
-rw-r--r-- | bpkg/rep-remove.cxx | 4 |
3 files changed, 4 insertions, 10 deletions
diff --git a/bpkg/manifest-utility.cxx b/bpkg/manifest-utility.cxx index fcda389..484ba32 100644 --- a/bpkg/manifest-utility.cxx +++ b/bpkg/manifest-utility.cxx @@ -93,10 +93,6 @@ namespace bpkg try { repository_url u (s); - - if (u.empty ()) - fail << "empty repository location"; - assert (u.path); // Make the relative path absolute using the current directory. diff --git a/bpkg/package.hxx b/bpkg/package.hxx index 6b19203..ea48045 100644 --- a/bpkg/package.hxx +++ b/bpkg/package.hxx @@ -231,9 +231,9 @@ namespace bpkg repository_type type; }; - #pragma db map type(repository_url) as(string) \ - to((?).string ()) \ - from(bpkg::repository_url (?)) + #pragma db map type(repository_url) as(string) \ + to((?).string ()) \ + from((?).empty () ? bpkg::repository_url () : bpkg::repository_url (?)) #pragma db map type(repository_type) as(string) \ to(to_string (?)) \ diff --git a/bpkg/rep-remove.cxx b/bpkg/rep-remove.cxx index 192fe47..c070418 100644 --- a/bpkg/rep-remove.cxx +++ b/bpkg/rep-remove.cxx @@ -433,9 +433,7 @@ namespace bpkg try { repository_url u (a); - - if (u.empty ()) - fail << "empty repository location"; + assert (!u.empty ()); for (const lazy_shared_ptr<repository>& rp: ua) { |