Skip to content

Commit 0e4c1ff

Browse files
committed
always set Key field in headObject
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 55346b5 commit 0e4c1ff

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

apps/files_external/lib/Lib/Storage/AmazonS3.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ private function headObject($key) {
154154
}
155155
}
156156

157+
if (!isset($this->objectCache[$key]["Key"])) {
158+
$this->objectCache[$key]["Key"] = $key;
159+
}
157160
return $this->objectCache[$key];
158161
}
159162

@@ -345,7 +348,6 @@ public function stat($path) {
345348
if ($object === false) {
346349
return false;
347350
}
348-
$object["Key"] = $path;
349351
$stat = $this->objectToMetaData($object);
350352
}
351353
$stat['atime'] = time();

0 commit comments

Comments
 (0)