Permalink
Browse files

Fix how S3 registers its subswrapper to make it more restful, was pre…

…venting cross_copy to work.
  • Loading branch information...
1 parent 636845e commit de2d3ad4a5a6b122611c302e8e8ce5a9ff2f67c2 @cdujeu cdujeu committed May 21, 2016
@@ -28,10 +28,12 @@ class S3Client extends AwsS3Client
{
/**
* Register a new stream wrapper who overwrite the Amazon S3 stream wrapper with this client instance.
+ * @param string $repositoryId
+ * @return $this|void
*/
- public function registerStreamWrapper()
+ public function registerStreamWrapper($repositoryId)
{
/* S3Client + s3 protocol + cacheInterface */
- StreamWrapper::register($this, "s3", new s3CacheService());
+ StreamWrapper::register($this, "s3.".$repositoryId, new s3CacheService());
}
}
@@ -60,7 +60,7 @@ public function performChecks()
* Override parent to register underlying wrapper (s3) as well
*/
public function detectStreamWrapper($register = false){
-
+ /*
if(isSet($this->repository)){
require_once("aws.phar");
$options = array(
@@ -107,6 +107,7 @@ public function detectStreamWrapper($register = false){
$this->s3Client->registerStreamWrapper();
}
+ */
return parent::detectStreamWrapper($register);
}
Oops, something went wrong.

0 comments on commit de2d3ad

Please sign in to comment.