From: dms Date: Sat, 7 Apr 2001 15:59:17 +0000 (+0000) Subject: isStale is basically used by Debian.pl and we were using age in terms of X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=870f3bf38095103325f0cc7eb196006d47ee6ddc;p=infobot.git isStale is basically used by Debian.pl and we were using age in terms of seconds but the actual function was assuming it was in days - fixed. git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@435 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/Misc.pl b/blootbot/src/Misc.pl index 1a216c6..be5e034 100644 --- a/blootbot/src/Misc.pl +++ b/blootbot/src/Misc.pl @@ -449,10 +449,12 @@ sub isStale { return 1 unless ( -f $file); if ($file =~ /idx/) { - my $age = time() - (stat($file))[9]; - &DEBUG("stale: $age. (". &Time2String($age) .")"); + my $age2 = time() - (stat($file))[9]; + &DEBUG("stale: $age2. (". &Time2String($age2) .")"); } - return 1 if (time() - (stat($file))[9] > $age*60*60*24); + $age *= 60*60*24 if ($age >= 0 and $age < 30); + + return 1 if (time() - (stat($file))[9] > $age); return 0; }