summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArto Bendiken2006-11-27 16:32:32 (GMT)
committerArto Bendiken2006-11-27 16:32:32 (GMT)
commit739e00227cf0993029aa218bcfb4454054ba1ee4 (patch)
tree1defc4cb5b501b0757dddddfad40c0bc0b714df9
parentaa14c1ccf9ebe43f63aa11bc567a52c379244df5 (diff)
Prevented spurious watchdog notice on cron if cache directory doesn't exist.
-rw-r--r--boost.api.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/boost.api.inc b/boost.api.inc
index 5fd1925..d16d531 100644
--- a/boost.api.inc
+++ b/boost.api.inc
@@ -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;
}