2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-11-09 22:14:59 +00:00

Join identifier onto public_endpoint, rather than overwriting the existing path

This commit is contained in:
asonix 2024-01-11 16:06:44 -06:00
parent 9ceb26bb5c
commit 708c25f20a

View file

@ -403,10 +403,9 @@ impl Store for ObjectStore {
}
fn public_url(&self, identifier: &Arc<str>) -> Option<url::Url> {
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))]