]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Misc.pl
safe delete did not run delFactoid, hah! found by asuffield
[infobot.git] / 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;
 }