summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2014-08-20 15:48:51 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2014-08-20 15:48:51 +0200
commit6c593c6adfd14205fda9c70babeefee3d4b16358 (patch)
treee79f25de294f8b3b95abc584c5399bcfda045dd7 /apps
parent57746ffed43fde4847d7457499d497d6d1b32024 (diff)
parent240b9523334a1ae90e83e566d332c453f41f8351 (diff)
downloadnextcloud-server-6c593c6adfd14205fda9c70babeefee3d4b16358.tar.gz
nextcloud-server-6c593c6adfd14205fda9c70babeefee3d4b16358.zip
Merge pull request #10423 from owncloud/urlencode_s3_copyobject_copysource
urlencode s3 copyObject() copysource
Diffstat (limited to 'apps')
-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 3b0ae5bbe0d..60d2677ddda 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, '/');
@@ -436,7 +437,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) {
@@ -452,7 +453,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) {