mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
Remove error package and cause functions (#5784)
This commit is contained in:
@@ -24,7 +24,6 @@ import (
|
||||
"runtime"
|
||||
|
||||
"github.com/minio/minio/cmd/logger"
|
||||
"github.com/minio/minio/pkg/errors"
|
||||
"github.com/minio/minio/pkg/lock"
|
||||
)
|
||||
|
||||
@@ -175,7 +174,6 @@ func fsStat(ctx context.Context, statLoc string) (os.FileInfo, error) {
|
||||
func fsStatVolume(ctx context.Context, volume string) (os.FileInfo, error) {
|
||||
fi, err := fsStat(ctx, volume)
|
||||
if err != nil {
|
||||
err = errors.Cause(err)
|
||||
if os.IsNotExist(err) {
|
||||
return nil, errVolumeNotFound
|
||||
} else if os.IsPermission(err) {
|
||||
@@ -200,7 +198,6 @@ func osErrToFSFileErr(err error) error {
|
||||
if err == nil {
|
||||
return nil
|
||||
}
|
||||
err = errors.Cause(err)
|
||||
if os.IsNotExist(err) {
|
||||
return errFileNotFound
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user