[HttpKernel] Updated mirror method to check for symlinks before dirs and files

This commit is contained in:
Jonathan Ingram 2011-10-25 20:58:39 +12:00
parent 876ef554e5
commit 6343bef55e

View File

@ -204,12 +204,12 @@ class Filesystem
foreach ($iterator as $file) {
$target = $targetDir.'/'.str_replace($originDir.DIRECTORY_SEPARATOR, '', $file->getPathname());
if (is_dir($file)) {
if (is_link($file)) {
$this->symlink($file, $target);
} else if (is_dir($file)) {
$this->mkdir($target);
} else if (is_file($file) || ($copyOnWindows && is_link($file))) {
$this->copy($file, $target, isset($options['override']) ? $options['override'] : false);
} else if (is_link($file)) {
$this->symlink($file, $target);
} else {
throw new \RuntimeException(sprintf('Unable to guess "%s" file type.', $file));
}