From: Robin Appelman Date: Tue, 15 Nov 2022 16:17:59 +0000 (+0100) Subject: fix s3 directory copy X-Git-Tag: v26.0.0beta1~402^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ed8fedc6851c61bc5d703c1b32db05bc0dfb0057;p=nextcloud-server.git fix s3 directory copy Signed-off-by: Robin Appelman --- diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php index 9e91b89d29e..ffa25dba999 100644 --- a/apps/files_external/lib/Lib/Storage/AmazonS3.php +++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php @@ -608,9 +608,9 @@ class AmazonS3 extends \OC\Files\Storage\Common { } foreach ($this->getDirectoryContent($source) as $item) { - $source = $source . '/' . $item['name']; - $target = $target . '/' . $item['name']; - $this->copy($source, $target, $item['mimetype'] !== FileInfo::MIMETYPE_FOLDER); + $childSource = $source . '/' . $item['name']; + $childTarget = $target . '/' . $item['name']; + $this->copy($childSource, $childTarget, $item['mimetype'] !== FileInfo::MIMETYPE_FOLDER); } }