mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
a1e1f40ded
Signed-off-by: June Clementine Strawberry <strawberry@puppygock.gay>
17 lines
392 B
Rust
17 lines
392 B
Rust
use std::path::PathBuf;
|
|
|
|
use conduwuit::{Err, Result, info, warn};
|
|
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(())
|
|
}
|