|
|
@ -709,7 +709,7 @@ func (fs *FSObjects) GetObjectNInfo(ctx context.Context, bucket, object string, |
|
|
|
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.
|
|
|
|
// For a directory, we need to return a reader that returns no bytes.
|
|
|
|
if HasSuffix(object, SlashSeparator) { |
|
|
|
if HasSuffix(object, SlashSeparator) { |
|
|
|
// The lock taken above is released when
|
|
|
|
// The lock taken above is released when
|
|
|
|
// objReader.Close() is called by the caller.
|
|
|
|
// objReader.Close() is called by the caller.
|
|
|
@ -958,6 +958,10 @@ func (fs *FSObjects) getObjectInfoNoFSLock(ctx context.Context, bucket, object s |
|
|
|
|
|
|
|
|
|
|
|
// getObjectInfo - wrapper for reading object metadata and constructs ObjectInfo.
|
|
|
|
// getObjectInfo - wrapper for reading object metadata and constructs ObjectInfo.
|
|
|
|
func (fs *FSObjects) getObjectInfo(ctx context.Context, bucket, object string) (oi ObjectInfo, e error) { |
|
|
|
func (fs *FSObjects) getObjectInfo(ctx context.Context, bucket, object string) (oi ObjectInfo, e error) { |
|
|
|
|
|
|
|
if strings.HasSuffix(object, SlashSeparator) && !fs.isObjectDir(bucket, object) { |
|
|
|
|
|
|
|
return oi, errFileNotFound |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fsMeta := fsMetaV1{} |
|
|
|
fsMeta := fsMetaV1{} |
|
|
|
if HasSuffix(object, SlashSeparator) { |
|
|
|
if HasSuffix(object, SlashSeparator) { |
|
|
|
fi, err := fsStatDir(ctx, pathJoin(fs.fsPath, bucket, object)) |
|
|
|
fi, err := fsStatDir(ctx, pathJoin(fs.fsPath, bucket, object)) |
|
|
|