Skip to content

Commit

Permalink
Merge pull request #19 from emeraldpay/fix/extra-slash-on-bucket-start
Browse files Browse the repository at this point in the history
  • Loading branch information
splix authored Dec 24, 2023
2 parents 4dd2e08 + 46d8152 commit aa9c9b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ class GoogleStorage(
private val export: RunConfig.ExportBucket = runConfig.export.bucket!!
val bucket = export.bucket
val bucketPath = BucketPath(
export.path.let { if (it.endsWith("/")) it.substring(0, it.length - 2) else it },
export.path
.let { if (it.endsWith("/")) it.substring(0, it.length - 2) else it }
.trimStart('/'),
)

lateinit var storage: Storage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ class S3Config(
val bucket = export.bucket
val bucketPath = BucketPath(
export.path
.let { if (it.endsWith("/")) it.substring(0, it.length - 2) else it },
.let { if (it.endsWith("/")) it.substring(0, it.length - 2) else it }
.trimStart('/'),
)

lateinit var storage: S3Client
Expand Down

0 comments on commit aa9c9b0

Please sign in to comment.