1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-16 22:48:27 +00:00

Workaround for container registry push/pull errors (#21862) (#22069)

Backport of #21862
This commit is contained in:
KN4CK3R
2022-12-10 15:22:41 +01:00
committed by GitHub
parent e93a4a0174
commit e23ad87b55
5 changed files with 100 additions and 4 deletions

View File

@@ -30,6 +30,13 @@ func (s *ContentStore) Get(key BlobHash256Key) (storage.Object, error) {
return s.store.Open(KeyToRelativePath(key))
}
// FIXME: Workaround to be removed in v1.20
// https://github.com/go-gitea/gitea/issues/19586
func (s *ContentStore) Has(key BlobHash256Key) error {
_, err := s.store.Stat(KeyToRelativePath(key))
return err
}
// Save stores a package blob
func (s *ContentStore) Save(key BlobHash256Key, r io.Reader, size int64) error {
_, err := s.store.Save(KeyToRelativePath(key), r, size)