Skip to content

Commit

Permalink
fix versionId
Browse files Browse the repository at this point in the history
  • Loading branch information
DyfanJones committed Aug 16, 2024
1 parent 172d8d9 commit 67a5783
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions paws.common/R/custom_s3.R
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ handle_copy_source_param <- function(request) {

quote_source_header <- function(source) {
result <- regexpr(VERSION_ID_SUFFIX, source, perl = TRUE)
if (result != 1) {
if (result != -1) {
first <- substr(source, 1, result-1)
version_id <- substr(source, result, nchar(source))
return(paste0(paws_url_encoder(first, '-._~/'), version_id))
Expand All @@ -521,7 +521,7 @@ quote_source_header_from_list <- function(source) {
}
final <- paws_url_encoder(final, '-._~/')
if (!is.null(version_id <- source[['VersionId']])) {
final <- paste0(final, version_id)
final <- paste0(final, "?versionId=", version_id)
}
return(final)
}
Expand Down

0 comments on commit 67a5783

Please sign in to comment.