8000 merged branch jonathaningram/patch-1 (PR #2466) · Kiruban2011/symfony@68eb068 · GitHub
[go: up one dir, main page]

Skip to content

Commit 68eb068

Browse files
committed
merged branch jonathaningram/patch-1 (PR symfony#2466)
Commits ------- 6343bef [HttpKernel] Updated mirror method to check for symlinks before dirs and files Discussion ---------- [HttpKernel] Updated mirror method to check for symlinks before dirs and files Bug fix: yes Feature addition: no Backwards compatibility break: no Symfony2 tests pass: yes Fixes the following tickets: symfony#2436
2 parents 876ef55 + 6343bef commit 68eb068

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/HttpKernel/Util/Filesystem.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,12 @@ public function mirror($originDir, $targetDir, \Traversable $iterator = null, $o
204204
foreach ($iterator as $file) {
205205
$target = $targetDir.'/'.str_replace($originDir.DIRECTORY_SEPARATOR, '', $file->getPathname());
206206

207-
if (is_dir($file)) {
207+
if (is_link($file)) {
208+
$this->symlink($file, $target);
209+
} else if (is_dir($file)) {
208210
$this->mkdir($target);
209211
} else if (is_file($file) || ($copyOnWindows && is_link($file))) {
210212
$this->copy($file, $target, isset($options['override']) ? $options['override'] : false);
211-
} else if (is_link($file)) {
212-
$this->symlink($file, $target);
213213
} else {
214214
throw new \RuntimeException(sprintf('Unable to guess "%s" file type.', $file));
215215
}

0 commit comments

Comments
 (0)
0