correct arithmetic adjustments

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-05-05 20:40:58 -04:00 committed by June
parent 16a98b0683
commit 321e197d8c
12 changed files with 24 additions and 53 deletions

View file

@ -402,19 +402,8 @@ impl KeyValueDatabase {
let sqlite_exists = path.join("conduit.db").exists();
let rocksdb_exists = path.join("IDENTITY").exists();
let mut count: u8 = 0;
if sqlite_exists {
count = count.saturating_add(1);
}
if rocksdb_exists {
count = count.saturating_add(1);
}
if count > 1 {
error!("Multiple databases at database_path detected");
return Ok(());
if sqlite_exists && rocksdb_exists {
return Err(Error::bad_config("Multiple databases at database_path detected."));
}
if sqlite_exists && config.database_backend != "sqlite" {