func (m *minioObject) Stat() (os.FileInfo, error) {
oi, err := m.Object.Stat()
if err != nil {
- return nil, err
+ return nil, convertMinioErr(err)
}
return &minioFileInfo{oi}, nil
import (
"bytes"
"encoding/gob"
+ "errors"
"fmt"
"io"
"net/http"
rPath := strings.TrimPrefix(req.RequestURI, "/"+prefix)
u, err := objStore.URL(rPath, path.Base(rPath))
if err != nil {
- if err == os.ErrNotExist {
+ if os.IsNotExist(err) || errors.Is(err, os.ErrNotExist) {
log.Warn("Unable to find %s %s", prefix, rPath)
ctx.Error(404, "file not found")
return
//If we have matched and access to release or issue
fr, err := objStore.Open(rPath)
if err != nil {
- if err == os.ErrNotExist {
+ if os.IsNotExist(err) || errors.Is(err, os.ErrNotExist) {
log.Warn("Unable to find %s %s", prefix, rPath)
ctx.Error(404, "file not found")
return