diff --git a/src/S3/StreamWrapper.php b/src/S3/StreamWrapper.php index 241370e956..333956d073 100644 --- a/src/S3/StreamWrapper.php +++ b/src/S3/StreamWrapper.php @@ -515,6 +515,8 @@ private function formatKey($key) */ public function rename($path_from, $path_to) { + // PHP will not allow rename across wrapper types, so we can safely + // assume $path_from and $path_to have the same protocol $this->initProtocol($path_from); $partsFrom = $this->withPath($path_from); $partsTo = $this->withPath($path_to);