From faa268bd08154ce0f53f86c70a2fc9c07560a7f5 Mon Sep 17 00:00:00 2001 From: Albin Kerouanton Date: Fri, 7 Jul 2017 00:38:13 +0200 Subject: [PATCH] Remove trailing slash from directory option passed to AwsS3 adapter --- src/Gaufrette/Adapter/AwsS3.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Gaufrette/Adapter/AwsS3.php b/src/Gaufrette/Adapter/AwsS3.php index 13d87dc2c..356f30acf 100644 --- a/src/Gaufrette/Adapter/AwsS3.php +++ b/src/Gaufrette/Adapter/AwsS3.php @@ -52,6 +52,9 @@ public function __construct(S3Client $service, $bucket, array $options = [], $de $options ); + // Remove trailing slash so it can't be doubled in computePath() method + $this->options['directory'] = rtrim($this->options['directory'], '/'); + $this->detectContentType = $detectContentType; }