Skip to content

Commit 7fc68fe

Browse files
authored
Merge pull request #14211 from nextcloud/bugfix/prefix-path-to-filecache-s3
Prefix $path for filename for internal file cache
2 parents 993609c + 0d667d1 commit 7fc68fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public function opendir($path) {
309309
$files[] = $file;
310310

311311
// store this information for later usage
312-
$this->filesCache[$file] = [
312+
$this->filesCache[$path . $file] = [
313313
'ContentLength' => $object['Size'],
314314
'LastModified' => (string)$object['LastModified'],
315315
];
@@ -408,7 +408,7 @@ public function filetype($path) {
408408
}
409409

410410
try {
411-
if ($this->headObject($path)) {
411+
if (isset($this->filesCache[$path]) || $this->headObject($path)) {
412412
return 'file';
413413
}
414414
if ($this->headObject($path . '/')) {

0 commit comments

Comments
 (0)