mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-22 05:51:01 +00:00
improvements
This commit is contained in:
parent
488e6581af
commit
e00c7d32af
@ -291,9 +291,6 @@ func DeleteRepositoryDirectly(ctx context.Context, repoID int64, ignoreOrgTeams
|
|||||||
|
|
||||||
committer.Close()
|
committer.Close()
|
||||||
|
|
||||||
attachment_service.AddAttachmentsToCleanQueue(ctx, releaseAttachments)
|
|
||||||
attachment_service.AddAttachmentsToCleanQueue(ctx, repoAttachments)
|
|
||||||
|
|
||||||
if needRewriteKeysFile {
|
if needRewriteKeysFile {
|
||||||
if err := asymkey_service.RewriteAllPublicKeys(ctx); err != nil {
|
if err := asymkey_service.RewriteAllPublicKeys(ctx); err != nil {
|
||||||
log.Error("RewriteAllPublicKeys failed: %v", err)
|
log.Error("RewriteAllPublicKeys failed: %v", err)
|
||||||
@ -327,14 +324,8 @@ func DeleteRepositoryDirectly(ctx context.Context, repoID int64, ignoreOrgTeams
|
|||||||
system_model.RemoveStorageWithNotice(ctx, storage.LFS, "Delete orphaned LFS file", lfsObj)
|
system_model.RemoveStorageWithNotice(ctx, storage.LFS, "Delete orphaned LFS file", lfsObj)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove release attachments
|
attachment_service.AddAttachmentsToCleanQueue(ctx, releaseAttachments)
|
||||||
for _, attachment := range releaseAttachments {
|
attachment_service.AddAttachmentsToCleanQueue(ctx, repoAttachments)
|
||||||
system_model.RemoveStorageWithNotice(ctx, storage.Attachments, "Delete release attachment", attachment.RelativePath())
|
|
||||||
}
|
|
||||||
// Remove attachment with repo_id = repo.ID.
|
|
||||||
for _, attachment := range repoAttachments {
|
|
||||||
system_model.RemoveStorageWithNotice(ctx, storage.Attachments, "Delete repo attachment", attachment.RelativePath())
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(repo.Avatar) > 0 {
|
if len(repo.Avatar) > 0 {
|
||||||
if err := storage.RepoAvatars.Delete(repo.CustomAvatarRelativePath()); err != nil {
|
if err := storage.RepoAvatars.Delete(repo.CustomAvatarRelativePath()); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user