File tree Expand file tree Collapse file tree
iceberg-rust/src/object_store Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,14 +40,16 @@ impl Display for Bucket<'_> {
4040impl Bucket < ' _ > {
4141 /// Get the bucket and coud provider from the location string
4242 pub fn from_path ( path : & str ) -> Result < Bucket , Error > {
43- if path. starts_with ( "s3://" ) {
44- path. trim_start_matches ( "s3://" )
43+ if path. starts_with ( "s3://" ) || path. starts_with ( "s3a://" ) {
44+ let prefix = if path. starts_with ( "s3://" ) { "s3://" } else { "s3a://" } ;
45+ path. trim_start_matches ( prefix)
4546 . split ( '/' )
4647 . next ( )
4748 . map ( Bucket :: S3 )
4849 . ok_or ( Error :: NotFound ( format ! ( "Bucket in path {path}" ) ) )
49- } else if path. starts_with ( "gcs://" ) {
50- path. trim_start_matches ( "gcs://" )
50+ } else if path. starts_with ( "gcs://" ) || path. starts_with ( "gs://" ) {
51+ let prefix = if path. starts_with ( "gcs://" ) { "gcs://" } else { "gs://" } ;
52+ path. trim_start_matches ( prefix)
5153 . split ( '/' )
5254 . next ( )
5355 . map ( Bucket :: GCS )
You can’t perform that action at this time.
0 commit comments