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,10 +301,15 @@ class Filesystem
|
||||
*/
|
||||
public function symlink($originDir, $targetDir, $copyOnWindows = false)
|
||||
{
|
||||
if ($copyOnWindows && !function_exists('symlink')) {
|
||||
$this->mirror($originDir, $targetDir);
|
||||
if ('\\' === DIRECTORY_SEPARATOR) {
|
||||
$originDir = strtr($originDir, '/', '\\');
|
||||
$targetDir = strtr($targetDir, '/', '\\');
|
||||
|
||||
return;
|
||||
if ($copyOnWindows) {
|
||||
$this->mirror($originDir, $targetDir);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$this->mkdir(dirname($targetDir));
|
||||
|
Reference in New Issue
Block a user