mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
6a0f9add0c
Signed-off-by: Jason Volk <jason@zemos.net>
17 lines
392 B
Rust
17 lines
392 B
Rust
use std::path::PathBuf;
|
|
|
|
use conduwuit::{info, warn, Err, Result};
|
|
use rocksdb::Options;
|
|
|
|
use super::Db;
|
|
|
|
pub(crate) fn repair(db_opts: &Options, path: &PathBuf) -> Result {
|
|
warn!("Starting database repair. This may take a long time...");
|
|
match Db::repair(db_opts, path) {
|
|
| Ok(()) => info!("Database repair successful."),
|
|
| Err(e) => return Err!("Repair failed: {e:?}"),
|
|
}
|
|
|
|
Ok(())
|
|
}
|