mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
use S3Client::encodeKey(), fixes #8325
This commit is contained in:
parent
76c1095c25
commit
240b952333
1 changed files with 3 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue