mirror of https://github.com/apache/jclouds.git
Hash the content for fs MPU ETag if no xattr.
If there is no extended attribute support in the file system, the blobs will not have their associated ETags available. In that case, the file system blob store should rehash the content while producing the combined blob and return the expected S3-style ETag.
This commit is contained in:
parent
69ca45720d
commit
8d0e9dc962
|
@ -840,7 +840,9 @@ public final class LocalBlobStore implements BlobStore {
|
|||
Blob blobPart = getBlob(mpu.containerName(), MULTIPART_PREFIX + mpu.id() + "-" + mpu.blobName() + "-" + part.partNumber());
|
||||
contentLength += blobPart.getMetadata().getContentMetadata().getContentLength();
|
||||
blobs.add(blobPart);
|
||||
md5Hasher.putBytes(BaseEncoding.base16().lowerCase().decode(blobPart.getMetadata().getETag()));
|
||||
if (blobPart.getMetadata().getETag() != null) {
|
||||
md5Hasher.putBytes(BaseEncoding.base16().lowerCase().decode(blobPart.getMetadata().getETag()));
|
||||
}
|
||||
}
|
||||
String mpuETag = new StringBuilder("\"")
|
||||
.append(md5Hasher.hash())
|
||||
|
|
Loading…
Reference in New Issue