diff options
Diffstat (limited to 'models/migrations/v115.go')
-rw-r--r-- | models/migrations/v115.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/models/migrations/v115.go b/models/migrations/v115.go index 7708ed5e28..b242ccf238 100644 --- a/models/migrations/v115.go +++ b/models/migrations/v115.go @@ -13,6 +13,7 @@ import ( "path/filepath" "time" + "code.gitea.io/gitea/modules/container" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" @@ -39,7 +40,7 @@ func renameExistingUserAvatarName(x *xorm.Engine) error { } log.Info("%d User Avatar(s) to migrate ...", count) - deleteList := make(map[string]struct{}) + deleteList := make(container.Set[string]) start := 0 migrated := 0 for { @@ -86,7 +87,7 @@ func renameExistingUserAvatarName(x *xorm.Engine) error { return fmt.Errorf("[user: %s] user table update: %v", user.LowerName, err) } - deleteList[filepath.Join(setting.Avatar.Path, oldAvatar)] = struct{}{} + deleteList.Add(filepath.Join(setting.Avatar.Path, oldAvatar)) migrated++ select { case <-ticker.C: |