1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 21:35:45 +02:00

main: count arguments correctly

Replace one braindead mistake for another.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
Zygo Blaxell 2017-01-10 01:02:48 -05:00 committed by Zygo Blaxell
parent 3138002a1f
commit 845267821c

View File

@ -555,9 +555,6 @@ BeesTempFile::make_copy(const BeesFileRange &src)
int
bees_main(int argc, const char **argv)
{
THROW_CHECK1(invalid_argument, argc, argc >= 1);
vector<string> args(argv + 1, argv + argc - 1);
set_catch_explainer([&](string s) {
BEESLOG("\n\n*** EXCEPTION ***\n\t" << s << "\n***\n");
BEESCOUNT(exception_caught);
@ -569,6 +566,9 @@ bees_main(int argc, const char **argv)
list<shared_ptr<BeesContext>> all_contexts;
shared_ptr<BeesContext> bc;
THROW_CHECK1(invalid_argument, argc, argc >= 0);
vector<string> args(argv + 1, argv + argc);
// Create a context and start crawlers
bool did_subscription = false;
for (string arg : args) {