oncletom/wp-less — pull request #49 by Manvel (2013-11-26 11:33:07+00:00)
Title: unlink exception during utpdated files cleanup

Hi,
I was using your plugin for a while and noticed some exceptions
ErrorException [ Warning ]: unlink(/var/www/darth/html/wp-content/uploads/wp-less/my-theme/..): Is a directory

/var/www/darth/html/wp-content/plugins/wp-less/lib/Garbagecollector.class.php [ 118 ]

113	* @param array $files
114	* @return array
115	*/
116	protected function deleteFiles(array $files)
117	{
118	return array_map('unlink', $files);
119	}
120 }

I've fixed the Error by adding:
$dir->setFlags(RecursiveDirectoryIterator::SKIP_DOTS);
for RecursiveDirectoryIterator to skip the Dots during iteration.