mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	Fix gitea doctor will remove repo-avatar files when execute command storage-archives (#30094) (#30120)
backport #30094
This commit is contained in:
		@@ -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) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user