fix snapshot path

This commit is contained in:
mpostma 2021-03-25 10:23:31 +01:00
parent 79d09705d8
commit d029464de8
No known key found for this signature in database
GPG key ID: CBC8A7C1D7A28C3A
2 changed files with 20 additions and 9 deletions

View file

@ -98,6 +98,10 @@ impl IndexController {
update_handle.clone(),
Duration::from_secs(options.snapshot_interval_sec),
options.snapshot_dir.clone(),
options.db_path
.file_name()
.map(|n| n.to_owned().into_string().expect("invalid path"))
.unwrap_or_else(|| String::from("data.ms")),
);
tokio::task::spawn(snapshot_service.run());