Browse Source
more efficient is_dir
Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/4410/head
Robin Appelman
9 years ago
No known key found for this signature in database
GPG Key ID: CBCA68FBAEBF98C9
1 changed files with
10 additions and
0 deletions
-
apps/files_external/lib/Lib/Storage/AmazonS3.php
|
|
|
@ -287,6 +287,16 @@ class AmazonS3 extends \OC\Files\Storage\Common { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public function is_dir($path) { |
|
|
|
$path = $this->normalizePath($path); |
|
|
|
try { |
|
|
|
return $this->isRoot($path) || $this->getConnection()->doesObjectExist($this->bucket, $path . '/'); |
|
|
|
} catch (S3Exception $e) { |
|
|
|
\OCP\Util::logException('files_external', $e); |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
public function filetype($path) { |
|
|
|
$path = $this->normalizePath($path); |
|
|
|
|
|
|
|
|