We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36cb46a commit d897956Copy full SHA for d897956
src/Symfony/Component/Filesystem/Filesystem.php
@@ -301,10 +301,15 @@ private function isReadable($filename)
301
*/
302
public function symlink($originDir, $targetDir, $copyOnWindows = false)
303
{
304
- if ($copyOnWindows && !function_exists('symlink')) {
305
- $this->mirror($originDir, $targetDir);
+ if ('\\' === DIRECTORY_SEPARATOR) {
+ $originDir = strtr($originDir, '/', '\\');
306
+ $targetDir = strtr($targetDir, '/', '\\');
307
+
308
+ if ($copyOnWindows) {
309
+ $this->mirror($originDir, $targetDir);
310
- return;
311
+ return;
312
+ }
313
}
314
315
$this->mkdir(dirname($targetDir));
0 commit comments