mirror of
https://github.com/Mibew/handlebars.php.git
synced 2024-11-15 08:44:12 +03:00
Create cache dir if it does not exist.
This commit is contained in:
parent
72d4a9cd3e
commit
1b65a63b0c
@ -45,6 +45,13 @@ class Handlebars_Cache_Disk implements Handlebars_Cache
|
||||
if (empty($path)) {
|
||||
throw new InvalidArgumentException('Must specify disk cache path');
|
||||
}
|
||||
else if (!is_dir($path)) {
|
||||
@mkdir($path, 0777, true);
|
||||
|
||||
if (!is_dir($path)) {
|
||||
throw new RuntimeException('Could not create cache file path');
|
||||
}
|
||||
}
|
||||
|
||||
$this->_path = $path;
|
||||
$this->_prefix = $prefix;
|
||||
|
Loading…
Reference in New Issue
Block a user