range get of manifest object has no etag

This commit is contained in:
Ka-Hing Cheung 2015-07-14 17:15:10 -07:00 committed by Andrew Gaul
parent 537f411ebd
commit ad38e48205
1 changed files with 3 additions and 2 deletions

View File

@ -47,15 +47,16 @@ public class ToBlobMetadata implements Function<SwiftObject, MutableBlobMetadata
if (container.getAnybodyRead().isPresent()) {
to.setPublicUri(from.getUri());
}
String eTag = from.getETag();
to.setUri(from.getUri());
to.setETag(from.getETag());
to.setETag(eTag);
to.setName(from.getName());
to.setLastModified(from.getLastModified());
to.setContentMetadata(from.getPayload().getContentMetadata());
to.getContentMetadata().setContentMD5(from.getPayload().getContentMetadata().getContentMD5AsHashCode());
to.getContentMetadata().setExpires(from.getPayload().getContentMetadata().getExpires());
to.setUserMetadata(from.getMetadata());
if (from.getETag().equals(ParseObjectListFromResponse.SUBDIR_ETAG)) {
if (eTag != null && eTag.equals(ParseObjectListFromResponse.SUBDIR_ETAG)) {
to.setType(StorageType.RELATIVE_PATH);
} else {
to.setType(StorageType.BLOB);