fixed filesystem loader should not view directory as a valid template (closes #116)
authorFabien Potencier <fabien.potencier@gmail.com>
Mon, 6 Sep 2010 06:56:03 +0000 (08:56 +0200)
committerFabien Potencier <fabien.potencier@gmail.com>
Mon, 6 Sep 2010 06:56:03 +0000 (08:56 +0200)
lib/Twig/Loader/Filesystem.php

index 5d77183..679c24a 100644 (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;
             }