浏览代码

fix for paths like/begin with './'

Mirco Babini 12 年之前
父节点
当前提交
08f5746c10
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Mustache/Autoloader.php

+ 1 - 1
src/Mustache/Autoloader.php

@@ -61,7 +61,7 @@ class Mustache_Autoloader
             return;
         }
 
-        $file = sprintf('%s/%s.php', $this->baseDir, str_replace('_', '/', $class));
+        $file = sprintf('%s/%s.php', realpath($this->baseDir), str_replace('_', '/', $class));
         if (is_file($file)) {
             require $file;
         }