public
Description: The ultra-lightweight ultra-flexible blogging engine with a fetish for birds and misspellings.
Homepage: http://chyrp.net/
Clone URL: git://github.com/vito/chyrp.git
Click here to lend your support to: chyrp and make a donation at www.pledgie.com !
Ignore errors when Cacher fails to delete caches.
vito (author)
Sat Aug 30 10:51:11 -0700 2008
commit  836e49726831a263f49b0cab82ad1a9ba2ca42e9
tree    17d5389fd4b60ba25ec8c3fe1fd4ed3a8ace98a0
parent  d00d6dabe94cefdfbe1e7c77dfa158f4e668021b
...
80
81
82
83
 
84
85
86
87
 
88
89
90
...
93
94
95
96
 
97
98
99
...
102
103
104
105
 
106
107
108
...
110
111
112
113
 
114
115
116
...
80
81
82
 
83
84
85
86
 
87
88
89
90
...
93
94
95
 
96
97
98
99
...
102
103
104
 
105
106
107
108
...
110
111
112
 
113
114
115
116
0
@@ -80,11 +80,11 @@
0
     public function remove_expired() {
0
       foreach ((array) glob($this->caches."/*/*.html") as $file) {
0
         if (time() - filemtime($file) > Config::current()->cache_expire)
0
-          unlink($file);
0
+          @unlink($file);
0
 
0
         $dir = dirname($file);
0
         if (!count((array) glob($dir."/*")))
0
-          rmdir($dir);
0
+          @rmdir($dir);
0
       }
0
     }
0
 
0
@@ -93,7 +93,7 @@
0
         error_log("REGENERATING");
0
 
0
       foreach ((array) glob($this->caches."/*/*.html") as $file)
0
-        unlink($file);
0
+        @unlink($file);
0
     }
0
 
0
     public function regenerate_local($user = null) {
0
@@ -102,7 +102,7 @@
0
 
0
       $directory = (isset($user)) ? $this->caches."/".$user : $this->path ;
0
       foreach ((array) glob($directory."/*.html") as $file)
0
-        unlink($file);
0
+        @unlink($file);
0
     }
0
 
0
     public function remove_caches_for($url) {
0
@@ -110,7 +110,7 @@
0
         error_log("REMOVING caches for ".$url."...");
0
 
0
       foreach ((array) glob($this->caches."/*/".md5($url).".html") as $file)
0
-        unlink($file);
0
+        @unlink($file);
0
     }
0
 
0
     public function remove_post_cache($thing) {

Comments