Return default ETag if fs.json is empty (#6787)

master
kannappanr 6 years ago committed by GitHub
parent a40610d331
commit c872c1f1dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      cmd/fs-v1.go

@ -719,8 +719,12 @@ func (fs *FSObjects) getObjectInfo(ctx context.Context, bucket, object string) (
// Read from fs metadata only if it exists.
_, rerr := fsMeta.ReadFrom(ctx, rlk.LockedFile)
fs.rwPool.Close(fsMetaPath)
if rerr != nil && rerr != io.EOF {
return oi, rerr
if rerr != nil {
if rerr != io.EOF {
return oi, rerr
}
// Set Default ETag, if fs.json is empty
fsMeta = fs.defaultFsJSON(object)
}
}

Loading…
Cancel
Save