Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2019-02-14 20:06:09 +0300
committerDaniel Kesselberg <mail@danielkesselberg.de>2019-09-23 15:03:41 +0300
commit75b89440612ff45b55dabcb24c2932ea37ee2de0 (patch)
tree736c32b8cbdfe8675a89a903819f670a2635ffd9 /apps
parent80340a8d463e2d115ed1c33c0f0f54542f3e952e (diff)
Don't strip path from directory prefix
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/lib/Lib/Storage/AmazonS3.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php
index 019bfa17b3c..befa6567100 100644
--- a/apps/files_external/lib/Lib/Storage/AmazonS3.php
+++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php
@@ -335,7 +335,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
if (is_array($result['CommonPrefixes'])) {
foreach ($result['CommonPrefixes'] as $prefix) {
$files[] = substr(trim($prefix['Prefix'], '/'), strlen($path));
- $this->directoryCache[substr(trim($prefix['Prefix'], '/'), strlen($path))] = true;
+ $this->directoryCache[trim($prefix['Prefix'], '/')] = true;
}
}
if (is_array($result['Contents'])) {
@@ -433,6 +433,11 @@ class AmazonS3 extends \OC\Files\Storage\Common {
public function is_dir($path) {
$path = $this->normalizePath($path);
+
+ if (isset($this->filesCache[$path])) {
+ return false;
+ }
+
try {
return $this->isRoot($path) || $this->doesDirectoryExist($path);
} catch (S3Exception $e) {