summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/lib/Lib/Storage/AmazonS3.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php
index 606a6b0189a..59d8fad5ac8 100644
--- a/apps/files_external/lib/Lib/Storage/AmazonS3.php
+++ b/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);