Merge pull request #14211 from nextcloud/bugfix/prefix-path-to-filecache-s3

Prefix $path for filename for internal file cache
This commit is contained in:
Morris Jobke 2019-02-19 12:01:08 +01:00 committed by GitHub
commit 7fc68fe93e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 . '/')) {