Roxen.git / server / modules / graphics / graphic_text.pike

version» Context lines:

Roxen.git/server/modules/graphics/graphic_text.pike:1: - constant cvs_version="$Id: graphic_text.pike,v 1.121 1998/03/29 00:14:16 grubba Exp $"; + constant cvs_version="$Id: graphic_text.pike,v 1.122 1998/04/17 17:49:07 grubba Exp $";   constant thread_safe=1;      #include <module.h>   #include <stat.h>   inherit "module";   inherit "roxenlib";      #ifndef VAR_MORE   #define VAR_MORE 0   #endif /* VAR_MORE */
Roxen.git/server/modules/graphics/graphic_text.pike:702:   string base_key;   object mc;         array to_clean = ({});   void clean_cache_dir()   {    if(!sizeof(to_clean))    to_clean = get_dir(query("cache_dir"));    if(!sizeof(to_clean)) return; -  int md = file_stat(query("cache_dir")+to_clean[0])[ST_ATIME]; +  array st = file_stat(query("cache_dir")+to_clean[0]); +  int md; +  if (st) { +  md = st[ST_ATIME]; +  }    -  +  /* NOTE: We assume that time() is larger than query("cache_age")*3600 */ +     if((time() - md) > (query("cache_age")*3600))    rm(query("cache_dir")+to_clean[0]);       to_clean = to_clean[1..];    if(sizeof(to_clean))    call_out(clean_cache_dir, 0.1);    else    call_out(clean_cache_dir, 3600);   }