Skip to content

Commit

Permalink
always set Key field in headObject
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 committed Oct 15, 2021
1 parent 55346b5 commit 0e4c1ff
Showing 1 changed file with 3 additions and 1 deletion.
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 (!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

0 comments on commit 0e4c1ff

Please sign in to comment.