Skip to content

Commit

Permalink
[FrameworkBundle] fixed cache warmer when global view directory does …
Browse files Browse the repository at this point in the history
…not exist
  • Loading branch information
fabpot committed Jan 25, 2011
1 parent 5582683 commit 2499ac4
Showing 1 changed file with 6 additions and 4 deletions.
Expand Up @@ -78,11 +78,13 @@ protected function computeTemplatePaths()
}
}

$finder = new Finder();
foreach ($finder->files()->followLinks()->name('*.twig')->in($this->rootDir) as $file) {
list($category, $template) = $this->parseTemplateName($file, strtr($this->rootDir, '\\', '/').'/');
if (is_dir($this->rootDir)) {
$finder = new Finder();
foreach ($finder->files()->followLinks()->name('*.twig')->in($this->rootDir) as $file) {
list($category, $template) = $this->parseTemplateName($file, strtr($this->rootDir, '\\', '/').'/');

$templates[sprintf(':%s:%s', $category, $template)] = (string) $file;
$templates[sprintf(':%s:%s', $category, $template)] = (string) $file;
}
}

return $templates;
Expand Down

0 comments on commit 2499ac4

Please sign in to comment.