Skip to content

Commit e44abd3

Browse files
fix: non md5 etags (#1952)
* sha256 hash the etag
1 parent 18e8073 commit e44abd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api-get-object-file.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (c *Client) FGetObject(ctx context.Context, bucketName, objectName, filePat
6969
}
7070

7171
// Write to a temporary file "fileName.part.minio" before saving.
72-
filePartPath := filePath + objectStat.ETag + ".part.minio"
72+
filePartPath := filePath + sum256Hex([]byte(objectStat.ETag)) + ".part.minio"
7373

7474
// If exists, open in append mode. If not create it as a part file.
7575
filePart, err := os.OpenFile(filePartPath, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0o600)

0 commit comments

Comments
 (0)