Skip to content

Commit

Permalink
[HttpKernel] Updated mirror method to check for symlinks before dirs …
Browse files Browse the repository at this point in the history
…and files
  • Loading branch information
jonathaningram committed Oct 25, 2011
1 parent 876ef55 commit 6343bef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Symfony/Component/HttpKernel/Util/Filesystem.php
Expand Up @@ -204,12 +204,12 @@ public function mirror($originDir, $targetDir, \Traversable $iterator = null, $o
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));
}
Expand Down

0 comments on commit 6343bef

Please sign in to comment.