]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use local variable for directory name 17272/head
authorDaniel Kesselberg <mail@danielkesselberg.de>
Sat, 30 Mar 2019 11:27:52 +0000 (12:27 +0100)
committerBackportbot <backportbot-noreply@rullzer.com>
Thu, 26 Sep 2019 09:41:00 +0000 (09:41 +0000)
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
apps/files_external/lib/Lib/Storage/AmazonS3.php

index befa65671004fa3a5feda206a1d0ccd0577b8dc7..c6cd6e1b2ca68b71aead586e3f8de9604caa930c 100644 (file)
@@ -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'])) {