fixed filesystem loader should not view directory as a valid template (closes #116)

This commit is contained in:
Fabien Potencier
2010-09-06 08:56:03 +02:00
parent 81006eed21
commit 34b57fac5b
+1 -1
View File
@@ -107,7 +107,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface
}
foreach ($this->paths as $path) {
if (!file_exists($path.DIRECTORY_SEPARATOR.$name)) {
if (!file_exists($path.DIRECTORY_SEPARATOR.$name) || is_dir($path.DIRECTORY_SEPARATOR.$name)) {
continue;
}