Ensure backend slashes for symlinks on Windows systems
Resolves: #17614
This commit is contained in:
parent
36cb46a71a
commit
d897956362
@ -301,10 +301,15 @@ class Filesystem
|
|||||||
*/
|
*/
|
||||||
public function symlink($originDir, $targetDir, $copyOnWindows = false)
|
public function symlink($originDir, $targetDir, $copyOnWindows = false)
|
||||||
{
|
{
|
||||||
if ($copyOnWindows && !function_exists('symlink')) {
|
if ('\\' === DIRECTORY_SEPARATOR) {
|
||||||
$this->mirror($originDir, $targetDir);
|
$originDir = strtr($originDir, '/', '\\');
|
||||||
|
$targetDir = strtr($targetDir, '/', '\\');
|
||||||
|
|
||||||
return;
|
if ($copyOnWindows) {
|
||||||
|
$this->mirror($originDir, $targetDir);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->mkdir(dirname($targetDir));
|
$this->mkdir(dirname($targetDir));
|
||||||
|
Reference in New Issue
Block a user