]> source.dussan.org Git - nextcloud-server.git/commitdiff
always set Key field in `headObject`
authorRobin Appelman <robin@icewind.nl>
Fri, 15 Oct 2021 14:23:39 +0000 (16:23 +0200)
committerRobin Appelman <robin@icewind.nl>
Tue, 26 Oct 2021 12:44:25 +0000 (14:44 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/files_external/lib/Lib/Storage/AmazonS3.php

index e1383b8404c449c92c1e433dc85d835e9a496c3f..ee9d35847f1339cd03fec24e230750585d04a13a 100644 (file)
@@ -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();