Fix: Allow to pass only UUIDs and automatically add "todo/" prefix

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2019-11-23 20:00:01 +01:00
parent 82146e0c98
commit 8e0be9f1f7
1 changed files with 5 additions and 0 deletions

View File

@ -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<_>>>()