Don't break UNC file paths

Blindly replacing // causes network paths and paths with protocols to
break. Relying on correct input allows the user to get what they want
without the framework interfering.

Refs #12657
This commit is contained in:
mark_story 2018-10-19 22:08:39 -04:00
parent 240ae93b68
commit ffde7ee32a

View file

@ -764,8 +764,6 @@ class Shell extends CakeObject {
* @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::createFile * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::createFile
*/ */
public function createFile($path, $contents) { public function createFile($path, $contents) {
$path = str_replace(DS . DS, DS, $path);
$this->out(); $this->out();
if (is_file($path) && empty($this->params['force']) && $this->interactive === true) { if (is_file($path) && empty($this->params['force']) && $this->interactive === true) {