Revert "fix (s3): fix remove a single object (#225)" (#227)

This reverts commit 42b5043411.
This commit is contained in:
Mickael 2020-02-12 11:00:16 +11:00 committed by GitHub
parent 347f9b016b
commit 4a6de76c93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -226,14 +226,6 @@ func (s S3Backend) Rm(path string) error {
return NewError("Doesn't exist", 404)
}
if !strings.HasSuffix(p.path, "/") {
_, err := client.DeleteObject(&s3.DeleteObjectInput{
Bucket: aws.String(p.bucket),
Key: &p.path,
})
return err
}
objs, err := client.ListObjects(&s3.ListObjectsInput{
Bucket: aws.String(p.bucket),
Prefix: aws.String(p.path),