Skip to content
Prev Previous commit
Next Next commit
always set Key field in headObject
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Oct 15, 2021
commit 247e12da966aeceb833e8c60b833e089bee89f8a
4 changes: 3 additions & 1 deletion apps/files_external/lib/Lib/Storage/AmazonS3.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ private function headObject($key) {
}
}

if (is_array($this->objectCache[$key]) && !isset($this->objectCache[$key]["Key"])) {
$this->objectCache[$key]["Key"] = $key;
}
return $this->objectCache[$key];
}

Expand Down Expand Up @@ -345,7 +348,6 @@ public function stat($path) {
if ($object === false) {
return false;
}
$object["Key"] = $path;
$stat = $this->objectToMetaData($object);
}
$stat['atime'] = time();
Expand Down