mirror of
https://github.com/minio/minio.git
synced 2025-01-27 06:33:18 -05:00
parent
d3125857a8
commit
8022a6efd9
14
cmd/fs-v1.go
14
cmd/fs-v1.go
@ -490,20 +490,18 @@ func (fs *FSObjects) GetObjectNInfo(ctx context.Context, bucket, object string,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// For a directory, we need to send an reader that returns no bytes.
|
|
||||||
if hasSuffix(object, slashSeparator) {
|
|
||||||
// The lock taken above is released when
|
|
||||||
// objReader.Close() is called by the caller.
|
|
||||||
return NewGetObjectReaderFromReader(bytes.NewBuffer(nil), ObjectInfo{}, nsUnlocker), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Otherwise we get the object info
|
// Otherwise we get the object info
|
||||||
var objInfo ObjectInfo
|
var objInfo ObjectInfo
|
||||||
if objInfo, err = fs.getObjectInfo(ctx, bucket, object); err != nil {
|
if objInfo, err = fs.getObjectInfo(ctx, bucket, object); err != nil {
|
||||||
nsUnlocker()
|
nsUnlocker()
|
||||||
return nil, toObjectErr(err, bucket, object)
|
return nil, toObjectErr(err, bucket, object)
|
||||||
}
|
}
|
||||||
|
// For a directory, we need to send an reader that returns no bytes.
|
||||||
|
if hasSuffix(object, slashSeparator) {
|
||||||
|
// The lock taken above is released when
|
||||||
|
// objReader.Close() is called by the caller.
|
||||||
|
return NewGetObjectReaderFromReader(bytes.NewBuffer(nil), objInfo, nsUnlocker), nil
|
||||||
|
}
|
||||||
// Take a rwPool lock for NFS gateway type deployment
|
// Take a rwPool lock for NFS gateway type deployment
|
||||||
rwPoolUnlocker := func() {}
|
rwPoolUnlocker := func() {}
|
||||||
if bucket != minioMetaBucket && lockType != noLock {
|
if bucket != minioMetaBucket && lockType != noLock {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user