diff --git a/rsync-gateway/src/path_resolve.rs b/rsync-gateway/src/path_resolve.rs index a06e558..85fc1a2 100644 --- a/rsync-gateway/src/path_resolve.rs +++ b/rsync-gateway/src/path_resolve.rs @@ -61,9 +61,9 @@ pub async fn resolve<'a>( let content_disposition = format!("attachment; filename=\"{encoded_name}\"; filename*=UTF-8''{encoded_name}"); let s3_path = if s3_prefix.is_empty() { - format!("{namespace}/{:x}", blake2b.as_hex()) + format!("{:x}", blake2b.as_hex()) } else { - format!("{s3_prefix}/{namespace}/{:x}", blake2b.as_hex()) + format!("{s3_prefix}/{:x}", blake2b.as_hex()) }; // Expire the pre-signed URL halfway through its lifetime. let expired_at = Instant::now() + PRESIGN_TIMEOUT / 2; diff --git a/rsync-gateway/src/tests.rs b/rsync-gateway/src/tests.rs index 966fc1e..2ada09f 100644 --- a/rsync-gateway/src/tests.rs +++ b/rsync-gateway/src/tests.rs @@ -211,7 +211,7 @@ mod db_required { String::from("test") => Endpoint { s3_bucket: String::new(), - s3_prefix: String::new(), + s3_prefix: namespace.clone(), namespace: namespace.clone(), }, },