mirror of
https://github.com/minio/minio.git
synced 2025-01-12 07:23:23 -05:00
Return default ETag if fs.json is empty (#6787)
This commit is contained in:
parent
a40610d331
commit
c872c1f1dc
@ -719,9 +719,13 @@ func (fs *FSObjects) getObjectInfo(ctx context.Context, bucket, object string) (
|
|||||||
// Read from fs metadata only if it exists.
|
// Read from fs metadata only if it exists.
|
||||||
_, rerr := fsMeta.ReadFrom(ctx, rlk.LockedFile)
|
_, rerr := fsMeta.ReadFrom(ctx, rlk.LockedFile)
|
||||||
fs.rwPool.Close(fsMetaPath)
|
fs.rwPool.Close(fsMetaPath)
|
||||||
if rerr != nil && rerr != io.EOF {
|
if rerr != nil {
|
||||||
|
if rerr != io.EOF {
|
||||||
return oi, rerr
|
return oi, rerr
|
||||||
}
|
}
|
||||||
|
// Set Default ETag, if fs.json is empty
|
||||||
|
fsMeta = fs.defaultFsJSON(object)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return a default etag and content-type based on the object's extension.
|
// Return a default etag and content-type based on the object's extension.
|
||||||
|
Loading…
Reference in New Issue
Block a user