Skip to content

Commit 6e2ef32

Browse files
authored
fix(s3): path-style-access means no virtual-host (#944)
Hi, I noticed that this boolean check was inverted, it applied virtual host style access if path style access was true and vice-versa.
1 parent c754e27 commit 6e2ef32

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

crates/iceberg/src/io/storage_s3.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ pub(crate) fn s3_config_parse(mut m: HashMap<String, String>) -> Result<S3Config
8989
cfg.region = Some(region);
9090
};
9191
if let Some(path_style_access) = m.remove(S3_PATH_STYLE_ACCESS) {
92-
if is_truthy(path_style_access.to_lowercase().as_str()) {
93-
cfg.enable_virtual_host_style = true;
94-
}
92+
cfg.enable_virtual_host_style = !is_truthy(path_style_access.to_lowercase().as_str());
9593
};
9694
if let Some(arn) = m.remove(S3_ASSUME_ROLE_ARN) {
9795
cfg.role_arn = Some(arn);

0 commit comments

Comments
 (0)