From 708c25f20ae783af366b9fc7c770a866a58a2808 Mon Sep 17 00:00:00 2001 From: asonix Date: Thu, 11 Jan 2024 16:06:44 -0600 Subject: [PATCH] Join identifier onto public_endpoint, rather than overwriting the existing path --- src/store/object_store.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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))]