Check directories when compiling css
justus opened this issue · comments
justus commented
Compiled css file is not saved if it has directories in it's filename.
EDIT: True if directory doesn't already exist, of course :)
Here's a quick fix:
Less.php (Line 29)
$sources = array();
foreach ($source_names as $source)
{
// Check if target includes directories
$dirs = explode(DIRECTORY_SEPARATOR, $source);
// If found, check if directories really exist. If not, create them.
if(count(array_pop($dirs)))
{
$full_dir = rtrim($config->css_path, DIRECTORY_SEPARATOR.'/');
foreach($dirs as $dir)
{
$full_dir .= DIRECTORY_SEPARATOR.$dir;
if(!is_dir($full_dir))
{
mkdir($full_dir);
}
}
}
$sources[] = rtrim($config->less_path, DIRECTORY_SEPARATOR.'/').'/'.$source.'.less';
}
Jeremy Lindblom commented
thanks. I'll look into this as soon as I can.