remove "|| true" from init update logic; add command-line opt for that

feat/vaults
Tomáš Mládek 2020-09-30 01:31:59 +02:00
parent 02c65ded8e
commit f586b93af5
1 changed files with 7 additions and 2 deletions

View File

@ -43,6 +43,11 @@ fn main() -> Result<()> {
.long("no-browser")
.help("Do not open web browser with the UI."),
)
.arg(
Arg::with_name("NO_INITIAL_UPDATE")
.long("no-initial-update")
.help("Don't run a database update on start."),
)
.arg(
Arg::with_name("REINITIALIZE")
.long("reinitialize")
@ -94,8 +99,8 @@ fn main() -> Result<()> {
.bind(&bind)?
.run();
if open_result.new || true {
info!("The vault has been just created, running initial update...");
if !matches.is_present("NO_INITIAL_UPDATE") {
info!("Running initial update...");
actix::spawn(filesystem::reimport_directory(db_pool, vault_path));
}