Skip to content

Commit

Permalink
Check before deleting the event cache dv
Browse files Browse the repository at this point in the history
  • Loading branch information
sydhds committed Dec 20, 2024
1 parent b9233cd commit 4a29a72
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion massa-event-cache/src/event_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,9 @@ impl EventCache {
max_events_per_query: usize,
) -> Self {
// Clear the db
DB::destroy(&Options::default(), path).expect(DESTROY_ERROR);
if path.exists() {
DB::destroy(&Options::default(), path).expect(DESTROY_ERROR);
}
let options = {
let mut opts = Options::default();
opts.create_if_missing(true);
Expand Down

0 comments on commit 4a29a72

Please sign in to comment.