=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/mandocdb.c,v retrieving revision 1.96 retrieving revision 1.97 diff -c -r1.96 -r1.97 *** src/usr.bin/mandoc/mandocdb.c 2014/04/19 02:29:12 1.96 --- src/usr.bin/mandoc/mandocdb.c 2014/04/19 02:55:44 1.97 *************** *** 1,4 **** ! /* $Id: mandocdb.c,v 1.96 2014/04/19 02:29:12 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze --- 1,4 ---- ! /* $Id: mandocdb.c,v 1.97 2014/04/19 02:55:44 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze *************** *** 422,440 **** ohash_init(&mlinks, 6, &mlinks_info); if (OP_UPDATE == op || OP_DELETE == op || OP_TEST == op) { - /* - * Force processing all files. - */ - use_all = 1; /* * All of these deal with a specific directory. ! * Jump into that directory then collect files specified ! * on the command-line. */ if (0 == set_basedir(path_arg)) goto out; if (dbopen(1)) { for (i = 0; i < argc; i++) filescan(argv[i]); if (OP_TEST != op) --- 422,441 ---- ohash_init(&mlinks, 6, &mlinks_info); if (OP_UPDATE == op || OP_DELETE == op || OP_TEST == op) { /* * All of these deal with a specific directory. ! * Jump into that directory first. */ if (0 == set_basedir(path_arg)) goto out; + if (dbopen(1)) { + /* + * The existing database is usable. Process + * all files specified on the command-line. + */ + use_all = 1; for (i = 0; i < argc; i++) filescan(argv[i]); if (OP_TEST != op) *************** *** 444,449 **** --- 445,451 ---- * Database missing or corrupt. * Recreate from scratch. */ + exitcode = (int)MANDOCLEVEL_OK; op = OP_DEFAULT; if (0 == treescan()) goto out;