1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Fix repo avatar conflict (#32958)

Continue even if the avatar deleting fails
This commit is contained in:
wxiaoguang
2024-12-23 10:52:25 +08:00
committed by GitHub
parent b5f9a2d7c0
commit 462ce31530
4 changed files with 14 additions and 10 deletions

View File

@@ -317,7 +317,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
}
}