diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-03-30 12:27:52 +0100 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-09-23 14:03:41 +0200 |
commit | 72d22a48284dd9e700d3586db65cca50e9d6f2f0 (patch) | |
tree | 8914e1e0f5a418230fb8c58e5b5e385040e43757 | |
parent | 75b89440612ff45b55dabcb24c2932ea37ee2de0 (diff) | |
download | nextcloud-server-72d22a48284dd9e700d3586db65cca50e9d6f2f0.tar.gz nextcloud-server-72d22a48284dd9e700d3586db65cca50e9d6f2f0.zip |
Use local variable for directory name
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
-rw-r--r-- | apps/files_external/lib/Lib/Storage/AmazonS3.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php index befa6567100..c6cd6e1b2ca 100644 --- a/apps/files_external/lib/Lib/Storage/AmazonS3.php +++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php @@ -334,8 +334,9 @@ class AmazonS3 extends \OC\Files\Storage\Common { // sub folders if (is_array($result['CommonPrefixes'])) { foreach ($result['CommonPrefixes'] as $prefix) { - $files[] = substr(trim($prefix['Prefix'], '/'), strlen($path)); - $this->directoryCache[trim($prefix['Prefix'], '/')] = true; + $directoryName = trim($prefix['Prefix'], '/'); + $files[] = substr($directoryName, strlen($path)); + $this->directoryCache[$directoryName] = true; } } if (is_array($result['Contents'])) { |