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
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;
}