summaryrefslogtreecommitdiffstats
path: root/services/doctor
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2024-03-26 09:24:13 +0100
committerEarl Warren <contact@earl-warren.org>2024-03-30 07:17:30 +0100
commit1360e310912bd2294bdca58ff1ef7005c86f30d1 (patch)
tree218b9811696816b401bc68d75d4a444f925b2713 /services/doctor
parentFix alignment in actions right view (#29979) (diff)
downloadforgejo-1360e310912bd2294bdca58ff1ef7005c86f30d1.tar.xz
forgejo-1360e310912bd2294bdca58ff1ef7005c86f30d1.zip
Fix gitea doctor will remove repo-avatar files when execute command `storage-archives` (#30094)
Fix #30037 (cherry picked from commit 9cf0f0bb040162509702ec9aaf7df6662ecc13b1)
Diffstat (limited to '')
-rw-r--r--services/doctor/storage.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/doctor/storage.go b/services/doctor/storage.go
index f338537864..787df27549 100644
--- a/services/doctor/storage.go
+++ b/services/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) {