diff --git a/CHANGELOG.md b/CHANGELOG.md index ccb2c08..a61d830 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,8 +13,11 @@ even on minor releases, e.g. `0.7.5` -> `0.7.6`. ## unreleased +* fix [#289](https://github.com/scottlamb/moonfire-nvr/issues/289): crash on + pressing the `Add` button in the sample file directory dialog * log to `stderr` again, fixing a regression with the `tracing` change in 0.7.6. + ## 0.7.6 (2023-07-08) * new log formats using `tracing`. This will allow richer context information. diff --git a/server/src/cmds/config/dirs.rs b/server/src/cmds/config/dirs.rs index d4168bd..ccd2c9f 100644 --- a/server/src/cmds/config/dirs.rs +++ b/server/src/cmds/config/dirs.rs @@ -266,7 +266,7 @@ fn add_dir_dialog(db: &Arc, siv: &mut Cursive) { let db = db.clone(); move |siv| { let path = siv - .find_name::("path") + .find_name::("path") .unwrap() .get_content(); add_dir(&db, siv, path.as_ref().as_ref()) diff --git a/server/src/cmds/config/tab_complete.rs b/server/src/cmds/config/tab_complete.rs index f4c635a..722c815 100644 --- a/server/src/cmds/config/tab_complete.rs +++ b/server/src/cmds/config/tab_complete.rs @@ -32,6 +32,10 @@ impl TabCompleteEditView { self.tab_completer = Some(Rc::new(handler)); self } + + pub fn get_content(&self) -> Rc { + self.edit_view.borrow_mut().get_content() + } } impl View for TabCompleteEditView {