1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-18 00:08:35 +00:00

Do not allow different storage configurations to point to the same directory (#30169) (#30204)

Backport #30169 by wxiaoguang

Replace #29171

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot
2024-03-31 11:29:51 +08:00
committed by GitHub
parent 9d38c4d60e
commit cd117863f3
12 changed files with 75 additions and 47 deletions

View File

@@ -190,6 +190,14 @@ func DashboardPost(ctx *context.Context) {
func SelfCheck(ctx *context.Context) {
ctx.Data["PageIsAdminSelfCheck"] = true
ctx.Data["DeprecatedWarnings"] = setting.DeprecatedWarnings
if len(setting.DeprecatedWarnings) == 0 && !setting.IsProd {
if time.Now().Unix()%2 == 0 {
ctx.Data["DeprecatedWarnings"] = []string{"This is a test warning message in dev mode"}
}
}
r, err := db.CheckCollationsDefaultEngine()
if err != nil {
ctx.Flash.Error(fmt.Sprintf("CheckCollationsDefaultEngine: %v", err), true)