|
@@ -52,10 +52,10 @@ class Mustache_Loader_FilesystemLoader implements Mustache_Loader
|
|
|
|
|
|
|
|
if (strpos($this->baseDir, '://') === false) {
|
|
if (strpos($this->baseDir, '://') === false) {
|
|
|
$this->baseDir = realpath($this->baseDir);
|
|
$this->baseDir = realpath($this->baseDir);
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- if (!is_dir($this->baseDir)) {
|
|
|
|
|
- throw new Mustache_Exception_RuntimeException(sprintf('FilesystemLoader baseDir must be a directory: %s', $baseDir));
|
|
|
|
|
|
|
+ if (!is_dir($this->baseDir)) {
|
|
|
|
|
+ throw new Mustache_Exception_RuntimeException(sprintf('FilesystemLoader baseDir must be a directory: %s', $baseDir));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (array_key_exists('extension', $options)) {
|
|
if (array_key_exists('extension', $options)) {
|
|
@@ -99,7 +99,7 @@ class Mustache_Loader_FilesystemLoader implements Mustache_Loader
|
|
|
{
|
|
{
|
|
|
$fileName = $this->getFileName($name);
|
|
$fileName = $this->getFileName($name);
|
|
|
|
|
|
|
|
- if (!file_exists($fileName)) {
|
|
|
|
|
|
|
+ if (strpos($this->baseDir, '://') === false && !file_exists($fileName)) {
|
|
|
throw new Mustache_Exception_UnknownTemplateException($name);
|
|
throw new Mustache_Exception_UnknownTemplateException($name);
|
|
|
}
|
|
}
|
|
|
|
|
|