From f74acabba6288a4390f3336823648a498b4415b9 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 26 Feb 2024 14:48:40 -0700 Subject: [PATCH] Only process deletions if it is a Xapian data directory --- src/fts-backend-flatcurve-xapian.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fts-backend-flatcurve-xapian.cpp b/src/fts-backend-flatcurve-xapian.cpp index 3852783..38b8f84 100644 --- a/src/fts-backend-flatcurve-xapian.cpp +++ b/src/fts-backend-flatcurve-xapian.cpp @@ -1434,8 +1434,8 @@ fts_flatcurve_xapian_optimize_box_do(struct flatcurve_fts_backend *backend, if ((iter = fts_flatcurve_xapian_db_iter_init(backend, opts)) == NULL) return FALSE; while (fts_flatcurve_xapian_db_iter_next(iter)) { - if ((iter->type != FLATCURVE_XAPIAN_DB_TYPE_OPTIMIZE) && - (iter->type != FLATCURVE_XAPIAN_DB_TYPE_LOCK)) + if ((iter->type == FLATCURVE_XAPIAN_DB_TYPE_INDEX) || + (iter->type == FLATCURVE_XAPIAN_DB_TYPE_CURRENT)) fts_flatcurve_xapian_delete(backend, iter->path); } fts_flatcurve_xapian_db_iter_deinit(&iter);