Skip to content

Commit

Permalink
Update imagestore.go
Browse files Browse the repository at this point in the history
  • Loading branch information
elee1766 authored Nov 3, 2023
1 parent 6a66a9b commit 077f58b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/storage/imagestore/imagestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,13 @@ func (is *ImageStore) GetNextRepository(repo string) (string, error) {

driverErr := &driver.Error{}

// some s3 implementations (eg, digitalocean spaces) will return pathnotfounderror for walk but not list

Check failure on line 395 in pkg/storage/imagestore/imagestore.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(zotregistry.io/zot) (gci)
// therefore, we must also catch that error here.
if errors.As(err, &driver.PathNotFoundError{}) {
is.log.Debug().Msg("empty rootDir")
return "", nil

Check failure on line 399 in pkg/storage/imagestore/imagestore.go

View workflow job for this annotation

GitHub Actions / lint

return with no blank line before (nlreturn)
}

Check warning on line 400 in pkg/storage/imagestore/imagestore.go

View check run for this annotation

Codecov / codecov/patch

pkg/storage/imagestore/imagestore.go#L398-L400

Added lines #L398 - L400 were not covered by tests

if errors.Is(err, io.EOF) ||
(errors.As(err, driverErr) && errors.Is(driverErr.Enclosed, io.EOF)) {
return store, nil
Expand Down

0 comments on commit 077f58b

Please sign in to comment.