diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2019-11-23 20:00:01 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2019-12-01 14:44:36 +0100 |
commit | 8e0be9f1f7d5ad7e3ea8d1288d3d45f8f3a56d47 (patch) | |
tree | 94c7bf0abd7c3a6f2b4581239397755010c147be | |
parent | 82146e0c98d4fa7d32b92d88d21554fa0ab93174 (diff) |
Fix: Allow to pass only UUIDs and automatically add "todo/" prefix
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r-- | bin/domain/imag-todo/src/ui.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/domain/imag-todo/src/ui.rs b/bin/domain/imag-todo/src/ui.rs index 0b55b2aa..22ee70be 100644 --- a/bin/domain/imag-todo/src/ui.rs +++ b/bin/domain/imag-todo/src/ui.rs @@ -208,6 +208,11 @@ impl IdPathProvider for PathProvider { } .map(|v| v .into_iter() + .map(|s| if s.starts_with("todo") { + s.to_string() + } else { + format!("todo/{}", s) + }) .map(PathBuf::from) .map(|pb| pb.into_storeid()) .collect::<Result<Vec<_>>>() |