mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-07 13:33:24 +09:00
fix: restore missing blob file when re-publishing a package (#39239)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
co-authored by
wxiaoguang
parent
e4455fb494
commit
efa69e7230
@@ -9,6 +9,7 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/fs"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
@@ -87,9 +88,9 @@ func convertMinioErr(err error, optMsg ...string) error {
|
||||
// Convert two responses to standard analogues
|
||||
switch errResp.Code {
|
||||
case "NoSuchKey":
|
||||
return wrapErr(os.ErrNotExist)
|
||||
return wrapErr(fs.ErrNotExist)
|
||||
case "AccessDenied":
|
||||
return wrapErr(os.ErrPermission)
|
||||
return wrapErr(fs.ErrPermission)
|
||||
}
|
||||
|
||||
return wrapErr(err)
|
||||
|
||||
Reference in New Issue
Block a user