Skip to content

Commit

Permalink
Create the directory in Config::save if it doesn't exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
frankdejonge committed Feb 7, 2012
1 parent 51551a7 commit 96203a1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions classes/config.php
Expand Up @@ -161,6 +161,11 @@ public static function save($file, $config)
$path or $path = APPPATH.'config'.DS.$file.'.php';

$path = pathinfo($path);

if ( ! is_dir($path['dirname']))
{
mkdir($path['dirname'], 0777, true);
}

return \File::update($path['dirname'], $path['basename'], $content);
}
Expand Down

0 comments on commit 96203a1

Please sign in to comment.