Skip to content

Commit 0de3141

Browse files
committed
Merge pull request #196 from mziccard/fix-copy-source-generation
Fix source (meta)generation parameters in StorageImpl.copy
2 parents a6ccc30 + 4bca63e commit 0de3141

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

gcloud-java-storage/src/main/java/com/google/gcloud/spi/DefaultStorageRpc.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,10 +331,11 @@ public StorageObject copy(StorageObject source, Map<Option, ?> sourceOptions,
331331
.copy(source.getBucket(), source.getName(), target.getBucket(), target.getName(),
332332
target.getContentType() != null ? target : null)
333333
.setProjection(DEFAULT_PROJECTION)
334-
.setIfMetagenerationMatch(IF_SOURCE_METAGENERATION_MATCH.getLong(sourceOptions))
335-
.setIfMetagenerationNotMatch(IF_SOURCE_METAGENERATION_NOT_MATCH.getLong(sourceOptions))
336-
.setIfGenerationMatch(IF_SOURCE_GENERATION_MATCH.getLong(sourceOptions))
337-
.setIfGenerationNotMatch(IF_SOURCE_GENERATION_NOT_MATCH.getLong(sourceOptions))
334+
.setIfSourceMetagenerationMatch(IF_SOURCE_METAGENERATION_MATCH.getLong(sourceOptions))
335+
.setIfSourceMetagenerationNotMatch(
336+
IF_SOURCE_METAGENERATION_NOT_MATCH.getLong(sourceOptions))
337+
.setIfSourceGenerationMatch(IF_SOURCE_GENERATION_MATCH.getLong(sourceOptions))
338+
.setIfSourceGenerationNotMatch(IF_SOURCE_GENERATION_NOT_MATCH.getLong(sourceOptions))
338339
.setIfMetagenerationMatch(IF_METAGENERATION_MATCH.getLong(targetOptions))
339340
.setIfMetagenerationNotMatch(IF_METAGENERATION_NOT_MATCH.getLong(targetOptions))
340341
.setIfGenerationMatch(IF_GENERATION_MATCH.getLong(targetOptions))

0 commit comments

Comments
 (0)