mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
minor directory detect improvements
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
d85c0f0c73
commit
da4712b62c
1 changed files with 2 additions and 2 deletions
|
|
@ -204,7 +204,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
|
|||
return true;
|
||||
}
|
||||
} catch (S3Exception $e) {
|
||||
if ($e->getStatusCode() === 403) {
|
||||
if ($e->getStatusCode() >= 400 && $e->getStatusCode() < 500) {
|
||||
$this->directoryCache[$path] = false;
|
||||
}
|
||||
throw $e;
|
||||
|
|
@ -422,7 +422,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
|
|||
}
|
||||
|
||||
try {
|
||||
if (isset($this->directoryCache[$path])) {
|
||||
if (isset($this->directoryCache[$path]) && $this->directoryCache[$path]) {
|
||||
return 'dir';
|
||||
}
|
||||
if (isset($this->filesCache[$path]) || $this->headObject($path)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue