summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2014-08-14 17:23:19 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2014-08-14 21:46:50 +0200
commit240b9523334a1ae90e83e566d332c453f41f8351 (patch)
treed6cc858fb6b789bce93cbcce99560daff19e9ff8 /apps/files_external
parent76c1095c252dceac8be8bd9bf7fe92869ec7b75a (diff)
downloadnextcloud-server-240b9523334a1ae90e83e566d332c453f41f8351.tar.gz
nextcloud-server-240b9523334a1ae90e83e566d332c453f41f8351.zip
use S3Client::encodeKey(), fixes #8325
Diffstat (limited to 'apps/files_external')
-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) {