bug #17615 Ensure backend slashes for symlinks on Windows systems (cpsitgmbh)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #17615).
Discussion
----------
Ensure backend slashes for symlinks on Windows systems
Resolves: #17614
Commits
-------
d897956
Ensure backend slashes for symlinks on Windows systems
This commit is contained in:
commit
2e9e83e635
@ -301,11 +301,16 @@ class Filesystem
|
|||||||
*/
|
*/
|
||||||
public function symlink($originDir, $targetDir, $copyOnWindows = false)
|
public function symlink($originDir, $targetDir, $copyOnWindows = false)
|
||||||
{
|
{
|
||||||
if ($copyOnWindows && !function_exists('symlink')) {
|
if ('\\' === DIRECTORY_SEPARATOR) {
|
||||||
|
$originDir = strtr($originDir, '/', '\\');
|
||||||
|
$targetDir = strtr($targetDir, '/', '\\');
|
||||||
|
|
||||||
|
if ($copyOnWindows) {
|
||||||
$this->mirror($originDir, $targetDir);
|
$this->mirror($originDir, $targetDir);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->mkdir(dirname($targetDir));
|
$this->mkdir(dirname($targetDir));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user