diff --git a/src/store/object_store.rs b/src/store/object_store.rs index 6c81754..b837e07 100644 --- a/src/store/object_store.rs +++ b/src/store/object_store.rs @@ -403,10 +403,9 @@ impl Store for ObjectStore { } fn public_url(&self, identifier: &Arc) -> Option { - self.public_endpoint.clone().map(|mut endpoint| { - endpoint.set_path(identifier.as_ref()); - endpoint - }) + self.public_endpoint + .as_ref() + .and_then(|endpoint| endpoint.join(identifier.as_ref()).ok()) } #[tracing::instrument(skip(self))]