Commit 739e0022 authored by Arto's avatar Arto

Prevented spurious watchdog notice on cron if cache directory doesn't exist.

parent aa14c1cc
......@@ -60,7 +60,9 @@ function boost_is_cached($path) {
*/
function boost_cache_clear_all() {
clearstatcache();
return _boost_rmdir_rf(boost_cache_directory());
if (($cache_dir = boost_cache_directory()) && file_exists($cache_dir)) {
return _boost_rmdir_rf($cache_dir);
}
}
/**
......@@ -68,7 +70,9 @@ function boost_cache_clear_all() {
*/
function boost_cache_expire_all() {
clearstatcache();
_boost_rmdir_rf(boost_cache_directory(), 'boost_file_is_expired');
if (($cache_dir = boost_cache_directory()) && file_exists($cache_dir)) {
_boost_rmdir_rf($cache_dir, 'boost_file_is_expired');
}
return TRUE;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment