Skip to content

Commit

Permalink
Only process deletions if it is a Xapian data directory
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Feb 27, 2024
1 parent 5b4af52 commit f74acab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fts-backend-flatcurve-xapian.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f74acab

Please sign in to comment.