/**
* @param string $path
+ * @return string correctly encoded path
*/
private function normalizePath($path) {
$path = trim($path, '/');
$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) {
$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) {