From 4bc357d1ceea39789eabb12ef530a8697116d1dc Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 15 Oct 2021 16:23:39 +0200 Subject: always set Key field in `headObject` Signed-off-by: Robin Appelman --- apps/files_external/lib/Lib/Storage/AmazonS3.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apps/files_external') diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php index e1383b8404c..ee9d35847f1 100644 --- a/apps/files_external/lib/Lib/Storage/AmazonS3.php +++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php @@ -154,6 +154,9 @@ class AmazonS3 extends \OC\Files\Storage\Common { } } + if (is_array($this->objectCache[$key]) && !isset($this->objectCache[$key]["Key"])) { + $this->objectCache[$key]["Key"] = $key; + } return $this->objectCache[$key]; } @@ -345,7 +348,6 @@ class AmazonS3 extends \OC\Files\Storage\Common { if ($object === false) { return false; } - $object["Key"] = $path; $stat = $this->objectToMetaData($object); } $stat['atime'] = time(); -- cgit v1.2.3