From d67fe267d827622352c3cb80ae5605aacf4f2326 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Thu, 16 Apr 2020 18:01:34 +0200 Subject: [PATCH] Fix modification of recollindex args processing which was broken --- src/index/recollindex.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/index/recollindex.cpp b/src/index/recollindex.cpp index 73b3122c..fb83c998 100644 --- a/src/index/recollindex.cpp +++ b/src/index/recollindex.cpp @@ -641,6 +641,7 @@ int main(int argc, char **argv) b1: ; } + aremain = args.size() - argidx; if (op_flags & OPT_h) Usage(stdout); @@ -795,7 +796,7 @@ int main(int argc, char **argv) flushIdxReasons(); exit(status ? 0 : 1); } else if (op_flags & OPT_l) { - if (argc != 0) + if (aremain != 0) Usage(); vector stemmers = ConfIndexer::getStemmerNames(); for (vector::const_iterator it = stemmers.begin(); @@ -804,7 +805,7 @@ int main(int argc, char **argv) } exit(0); } else if (op_flags & OPT_s) { - if (argc != 1) + if (aremain != 1) Usage(); string lang = args[argidx++]; aremain--; exit(!createstemdb(config, lang)); @@ -816,7 +817,7 @@ int main(int argc, char **argv) #ifdef RCL_MONITOR } else if (op_flags & OPT_m) { - if (argc != 0) + if (aremain != 0) Usage(); lockorexit(&pidfile, config); if (updater) {