diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-10-14 15:51:55 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-10-14 15:51:55 +0200 |
commit | 108c54f8ae62453a76d05e31ad477efd3559e65a (patch) | |
tree | f2c678117ddebf736f6dce536af03560c8c12bdb | |
parent | 5f21e03ff813d9ef2b1d7c2a91f563faf6ae8572 (diff) |
Move check for empty archive file up the call stack
-rw-r--r-- | bpkg/fetch.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bpkg/fetch.cxx b/bpkg/fetch.cxx index 494b63d..2306d4e 100644 --- a/bpkg/fetch.cxx +++ b/bpkg/fetch.cxx @@ -467,7 +467,7 @@ namespace bpkg static string to_url (const string& host, uint16_t port, const path& file) { - assert (!file.empty () && file.relative ()); + assert (file.relative ()); if (*file.begin () == "..") fail << "invalid URL path " << file; @@ -680,7 +680,7 @@ namespace bpkg const path& a, const dir_path& d) { - assert (a.relative ()); + assert (!a.empty () && a.relative ()); assert (rl.remote () || rl.absolute ()); path f (rl.path () / a); |