always set Key field in headObject

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2021-10-15 16:23:39 +02:00
parent 06b59b5002
commit 4bc357d1ce
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB

View 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();