From 2f3f96aa653a18c7c48517ca5a587413a59026d1 Mon Sep 17 00:00:00 2001 From: dms Date: Sat, 7 Apr 2001 15:59:17 +0000 Subject: [PATCH] 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/blootbot@435 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/Misc.pl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Misc.pl b/src/Misc.pl index 1a216c6..be5e034 100644 --- a/src/Misc.pl +++ b/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; } -- 2.39.2