Fix repo avatar conflict (#32958) (#32960)

Backport #32958 by wxiaoguang

Continue even if the avatar deleting fails

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot
2024-12-23 11:17:38 +08:00
committed by GitHub
parent d670820722
commit e1026feddc
4 changed files with 14 additions and 10 deletions

View File

@@ -324,7 +324,8 @@ func DeleteRepositoryDirectly(ctx context.Context, doer *user_model.User, repoID
if len(repo.Avatar) > 0 {
if err := storage.RepoAvatars.Delete(repo.CustomAvatarRelativePath()); err != nil {
return fmt.Errorf("Failed to remove %s: %w", repo.Avatar, err)
log.Error("remove avatar file %q: %v", repo.CustomAvatarRelativePath(), err)
// go on
}
}