If cache_clear_all() is called and ctools has not created its css cache directory, watchdog logs the following error (output is from "drush cc all"):
file: The file was not deleted, because it does not exist.
Note that there are 3 spaces between "The file" and "was not deleted"; this is because there is no file name at all by the time watchdog() is called.
Error appears to be calling file_unmanaged_delete_recursive($filedir) at ctools/includes/css.inc:559, since if $filedir does not resolve to a directory that actually exists -- drupal_realpath() will return FALSE, and file_unmanaged_delete() gets flustered when it tries to delete file path FALSE.
Best fix is probably to call drupal_realpath() in ctools_css_flush_caches() before calling file_unmanaged_delete_recursive(); if drupal_realpath() does not return a real path, there's nothing to delete.
Comments
Comment #1
merlinofchaos commentedFixed and an additional @ and long comment added to deal with file permission errors that can happen when using drush.