From: dms Date: Tue, 13 Feb 2001 13:58:48 +0000 (+0000) Subject: added debian-specific debug to isStale X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=78751193b6dafdb53b013f87a746b25b9853bfc4;p=infobot.git added debian-specific debug to isStale git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@380 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/Misc.pl b/blootbot/src/Misc.pl index 8df144e..b190857 100644 --- a/blootbot/src/Misc.pl +++ b/blootbot/src/Misc.pl @@ -437,7 +437,16 @@ sub isStale { return 1; } + if (!defined $file) { + &WARN("isStale: file == NULL."); + return 1; + } + return 1 unless ( -f $file); + if ($file =~ /idx/) { + my $age = time() - (stat($file))[9]; + &DEBUG("stale: $age. (". &Time2String($age) .")"); + } return 1 if (time() - (stat($file))[9] > $age*60*60*24); return 0; }