mirror of
https://github.com/apache/jclouds.git
synced 2025-02-17 15:35:44 +00:00
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
f876800370
commit
e66bffa521
@ -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…
x
Reference in New Issue
Block a user