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
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2014-08-14 19:23:19 +0400
committerMorris Jobke <hey@morrisjobke.de>2014-08-21 00:27:44 +0400
commita3c6d20ccb7e554edcb949babac4381e17651ffa (patch)
tree373af129a9a4cd87c2a22d9921194dda77c45b49
parent9caff0be96eb3ab1eb788476f7f3ff6591225922 (diff)
use S3Client::encodeKey(), fixes #8325
-rw-r--r--apps/files_external/lib/amazons3.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php
index 10fc626c5da..cfc9b5145d3 100644
--- a/apps/files_external/lib/amazons3.php
+++ b/apps/files_external/lib/amazons3.php
@@ -56,6 +56,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
/**
* @param string $path
+ * @return string correctly encoded path
*/
private function normalizePath($path) {
$path = trim($path, '/');
@@ -441,7 +442,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
$result = $this->connection->copyObject(array(
'Bucket' => $this->bucket,
'Key' => $this->cleanKey($path2),
- 'CopySource' => $this->bucket . '/' . $path1
+ 'CopySource' => S3Client::encodeKey($this->bucket . '/' . $path1)
));
$this->testTimeout();
} catch (S3Exception $e) {
@@ -457,7 +458,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
$result = $this->connection->copyObject(array(
'Bucket' => $this->bucket,
'Key' => $path2 . '/',
- 'CopySource' => $this->bucket . '/' . $path1 . '/'
+ 'CopySource' => S3Client::encodeKey($this->bucket . '/' . $path1 . '/')
));
$this->testTimeout();
} catch (S3Exception $e) {