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.
This commit is contained in:
Harshavardhana 2018-02-02 00:34:15 -08:00 committed by Nitish Tiwari
parent da2faa19a1
commit 1ebbc2ce88

View File

@ -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)