]> git.mxchange.org Git - friendica.git/blobdiff - boot.php
Merge pull request #792 from annando/master
[friendica.git] / boot.php
index af164ec4249caf90b71badd2601806106f584abe..e94cdcd9007fae6b3de8f8c8d977fbc1735a7577 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -2156,6 +2156,7 @@ function clear_cache($basepath = "", $path = "") {
        if ($cachetime == 0)
                $cachetime = 86400;
 
+       if (is_writable($path)){
        if ($dh = opendir($path)) {
                while (($file = readdir($dh)) !== false) {
                        $fullpath = $path."/".$file;
@@ -2166,6 +2167,7 @@ function clear_cache($basepath = "", $path = "") {
                }
                closedir($dh);
        }
+       }
 }
 
 function set_template_engine(&$a, $engine = 'internal') {