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

Replace #29171
This commit is contained in:
2024-03-31 11:03:24 +08:00
committed by GitHub
parent 82ffd91607
commit 6d34ce25b1
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)