From 0c10c3a282463d9ada2a6d05cfc733e742c93351 Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Wed, 27 Mar 2024 11:09:17 +0900 Subject: [PATCH] Fix gitea doctor will remove repo-avatar files when execute command storage-archives (#30094) (#30120) backport #30094 --- modules/doctor/storage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/doctor/storage.go b/modules/doctor/storage.go index f338537864..787df27549 100644 --- a/modules/doctor/storage.go +++ b/modules/doctor/storage.go @@ -162,7 +162,7 @@ func checkStorage(opts *checkStorageOptions) func(ctx context.Context, logger lo if opts.RepoArchives || opts.All { if err := commonCheckStorage(ctx, logger, autofix, &commonStorageCheckOptions{ - storer: storage.RepoAvatars, + storer: storage.RepoArchives, isOrphaned: func(path string, obj storage.Object, stat fs.FileInfo) (bool, error) { exists, err := repo.ExistsRepoArchiverWithStoragePath(ctx, path) if err == nil || errors.Is(err, util.ErrInvalidArgument) {