diff --git a/bin/domain/imag-diary/src/util.rs b/bin/domain/imag-diary/src/util.rs index 9f965690..aeff186f 100644 --- a/bin/domain/imag-diary/src/util.rs +++ b/bin/domain/imag-diary/src/util.rs @@ -26,8 +26,10 @@ use toml_query::read::TomlValueReadExt; pub fn get_diary_name(rt: &Runtime) -> Option { use libimagdiary::config::get_default_diary_name; - get_default_diary_name(rt) - .or(rt.cli().value_of("diaryname").map(String::from)) + rt.cli() + .value_of("diaryname") + .map(String::from) + .or_else(|| get_default_diary_name(rt)) } pub enum Timed {