From 97bd253f83f1ede093e29b5b1004cc8d3bfe8d54 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 2 Apr 2011 19:20:53 +0200 Subject: [PATCH] Remove temp index on start and term of dbcheck --- bacula/src/tools/dbcheck.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bacula/src/tools/dbcheck.c b/bacula/src/tools/dbcheck.c index 7bdc0440d4..20a403bc9c 100644 --- a/bacula/src/tools/dbcheck.c +++ b/bacula/src/tools/dbcheck.c @@ -1,7 +1,7 @@ /* Bacula® - The Network Backup Solution - Copyright (C) 2002-2009 Free Software Foundation Europe e.V. + Copyright (C) 2002-2011 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -32,8 +32,6 @@ * * Kern E. Sibbald, August 2002 * - * Version $Id$ - * */ #include "bacula.h" @@ -307,6 +305,9 @@ int main (int argc, char *argv[]) return 1; } + /* drop temporary index idx_tmp_name if it already exists */ + drop_tmp_idx("idxPIchk", "File"); + if (batch) { repair_bad_paths(); repair_bad_filenames(); @@ -325,6 +326,9 @@ int main (int argc, char *argv[]) do_interactive_mode(); } + /* drop temporary index idx_tmp_name */ + drop_tmp_idx("idxPIchk", "File"); + db_close_database(NULL, db); close_msg(NULL); term_msg(); -- 2.39.5