summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTobi Oetiker <tobi@oetiker.ch>2005-07-04 07:58:11 +0200
committerTobi Oetiker <tobi@oetiker.ch>2005-07-04 07:58:11 +0200
commit3ca78feffa42b2863dcc23c2143d96bead1e107f (patch)
tree01ede4eb5bbc9742a6cf15ef6f60acdbeef1cfe5 /lib
parent6c3d9be08286f6bf6b21bfb7e4f8ee77900025df (diff)
downloadsmokeping-3ca78feffa42b2863dcc23c2143d96bead1e107f.tar.gz
smokeping-3ca78feffa42b2863dcc23c2143d96bead1e107f.tar.xz
the old pngs in __navcache did not get removed properly ...
Diffstat (limited to 'lib')
-rw-r--r--lib/Smokeping.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index 6df240b..641c651 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -735,9 +735,9 @@ sub get_detail ($$$$){
} else {
mkdir $cfg->{General}{imgcache}."/__navcache",0755 unless -d $cfg->{General}{imgcache}."/__navcache";
# remove old images after one hour
- my $pattern = "$cfg->{General}{imgcache}/__navcache/*.png";
- for (<"$pattern">){
- unlink $_ if -A $_ > 1/24;
+ my $pattern = $cfg->{General}{imgcache}."/__navcache/*.png";
+ for (glob $pattern){
+ unlink $_ if time - (stat $_)[9] > 3600;
}
$imgbase =$cfg->{General}{imgcache}."/__navcache/".time()."$$";
$imghref =$cfg->{General}{imgurl}."/__navcache/".time()."$$";