From 108c54f8ae62453a76d05e31ad477efd3559e65a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 14 Oct 2015 15:51:55 +0200 Subject: Move check for empty archive file up the call stack --- bpkg/fetch.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bpkg/fetch.cxx') 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); -- cgit v1.1