From 1ebbc2ce88660bc8f8ce3fef11928d7a77a3a07b Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Fri, 2 Feb 2018 00:34:15 -0800 Subject: [PATCH] Make sure to convert the disk errors to object errors (#5480) Fixes a bug introduced in the directory support PR, with this fix s3fs works properly. --- cmd/xl-v1-object.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/xl-v1-object.go b/cmd/xl-v1-object.go index 290a6c5bb..6c7a3b9b2 100644 --- a/cmd/xl-v1-object.go +++ b/cmd/xl-v1-object.go @@ -433,7 +433,10 @@ func (xl xlObjects) GetObjectInfo(bucket, object string) (oi ObjectInfo, e error } if hasSuffix(object, slashSeparator) { - return xl.getObjectInfoDir(bucket, object) + if oi, e = xl.getObjectInfoDir(bucket, object); e != nil { + return oi, toObjectErr(e, bucket, object) + } + return oi, nil } info, err := xl.getObjectInfo(bucket, object)