fix (s3): rm merge

This commit is contained in:
Mickael Kerjean 2020-06-23 21:45:42 +10:00
parent ade3c332e8
commit e0b8bf2e70

View file

@ -243,7 +243,7 @@ func (s S3Backend) Rm(path string) error {
client := s3.New(s.createSession(p.bucket))
if p.bucket == "" {
return ErrNotFound
} else if strings.Contains(path, "/") == false {
} else if strings.HasSuffix(path, "/") == false {
_, err := client.DeleteObject(&s3.DeleteObjectInput{
Bucket: aws.String(p.bucket),
Key: aws.String(p.path),