mirror of
https://github.com/ViViDboarder/bitwarden_rs.git
synced 2024-11-22 13:16:39 +00:00
Add an option to not enable WAL (should help in #399)
This commit is contained in:
parent
d7eeaaf249
commit
4df686f49e
@ -253,6 +253,9 @@ make_config! {
|
||||
extended_logging: bool, false, def, true;
|
||||
/// Log file path
|
||||
log_file: String, false, option;
|
||||
|
||||
/// Enable DB WAL |> Turning this off might lead to worse performance, but might help if using bitwarden_rs on some exotic filesystems, that do not support WAL
|
||||
enable_db_wal: bool, false, def, true;
|
||||
},
|
||||
|
||||
/// Yubikey settings
|
||||
|
@ -168,12 +168,14 @@ fn check_db() {
|
||||
}
|
||||
|
||||
// Turn on WAL in SQLite
|
||||
if CONFIG.enable_db_wal() {
|
||||
use diesel::RunQueryDsl;
|
||||
let connection = db::get_connection().expect("Can't conect to DB");
|
||||
diesel::sql_query("PRAGMA journal_mode=wal")
|
||||
.execute(&connection)
|
||||
.expect("Failed to turn on WAL");
|
||||
}
|
||||
}
|
||||
|
||||
fn check_rsa_keys() {
|
||||
// If the RSA keys don't exist, try to create them
|
||||
|
Loading…
Reference in New Issue
Block a user