Prefix $path for filename for internal file cache

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2019-02-14 17:06:14 +01:00
parent e65f7f05de
commit 659ed3ecda
No known key found for this signature in database
GPG Key ID: 36E3664E099D0614
1 changed files with 2 additions and 2 deletions

View File

@ -309,7 +309,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
$files[] = $file;
// store this information for later usage
$this->filesCache[$file] = [
$this->filesCache[$path . $file] = [
'ContentLength' => $object['Size'],
'LastModified' => (string)$object['LastModified'],
];
@ -408,7 +408,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
}
try {
if ($this->headObject($path)) {
if (isset($this->filesCache[$path]) && $this->headObject($path)) {
return 'file';
}
if ($this->headObject($path . '/')) {