]> git.donarmstrong.com Git - infobot.git/commitdiff
added debian-specific debug to isStale
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 13 Feb 2001 13:58:48 +0000 (13:58 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 13 Feb 2001 13:58:48 +0000 (13:58 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@380 c11ca15a-4712-0410-83d8-924469b57eb5

src/Misc.pl

index 8df144e483e67523ba424237a5ac9be0a79be04f..b190857e494deb4ed4c2793885ebce9a946b1b3a 100644 (file)
@@ -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;
 }