distribution/registry/storage
Ricardo Maraschini 87cbd09fa7 Ignore self reference object on empty prefix
When a given prefix is empty and we attempt to list its content AWS
returns that the prefix contains one object with key defined as the
prefix with an extra "/" at the end.

e.g.

If we call ListObjects() passing to it an existing but empty prefix,
say "my/empty/prefix", AWS will return that "my/empty/prefix/" is an
object inside "my/empty/prefix" (ListObjectsOutput.Contents).

This extra "/" causes the upload purging process to panic. On normal
circunstances we never find empty prefixes on S3 but users may touch
it.

Signed-off-by: Ricardo Maraschini <rmarasch@redhat.com>
2020-11-30 13:04:14 +01:00
..
cache
driver
blob_test.go
blobserver.go
blobstore.go
blobwriter.go
blobwriter_nonresumable.go
blobwriter_resumable.go
catalog.go
catalog_test.go
doc.go
error.go
filereader.go
filereader_test.go
garbagecollect.go
garbagecollect_test.go
io.go
linkedblobstore.go
linkedblobstore_test.go
manifestlisthandler.go
manifeststore.go
manifeststore_test.go
ocimanifesthandler.go
ocimanifesthandler_test.go
paths.go
paths_test.go
purgeuploads.go
purgeuploads_test.go
registry.go
schema2manifesthandler.go
schema2manifesthandler_test.go
signedmanifesthandler.go
tagstore.go
tagstore_test.go
v1unsupportedhandler.go
vacuum.go