diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php index 23f6592581..c311bc5b70 100644 --- a/apps/files_external/lib/Lib/Storage/AmazonS3.php +++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php @@ -160,7 +160,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { try { $result = $this->getConnection()->listObjects([ 'Bucket' => $this->bucket, - 'Prefix' => rtrim($path, '/') . '/', + 'Prefix' => rtrim($path, '/'), 'MaxKeys' => 1, ]); $this->directoryCache[$path] = $result['Contents'] || $result['CommonPrefixes'];