diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs index b75bcf60..5ca102a2 100644 --- a/pbs-api-types/src/datastore.rs +++ b/pbs-api-types/src/datastore.rs @@ -484,6 +484,11 @@ impl BackupNamespace { /// Try to parse a string into a namespace. pub fn new(name: &str) -> Result { let mut this = Self::root(); + + if name.is_empty() { + return Ok(this); + } + for name in name.split('/') { this.push(name.to_string())?; }