sub isStale {
my ($file, $age) = @_;
- &DEBUG("isStale: $file does not exist") unless ( -f $file);
return 1 unless ( -f $file);
return 1 if (time() - (stat($file))[9] > $age*60*60*24);
my $delta = time() - (stat($file))[9];
my $hage = $age*60*60*24;
- &DEBUG("isStale: not stale! $delta < $hage");
return 0;
}
if (&IsParam("forking") and $$ == $bot_pid) {
return $noreply unless (&addForked($label));
$SIG{CHLD} = 'IGNORE';
- $pid = eval { fork() }; # catch non-forking OSes and other errors
- return $noreply if $pid; # parent does nothing
+ $pid = eval { fork() };
+ return $noreply if $pid; # parent does nothing
&status("fork starting for '$label', PID == $$.");
}
if ($size = $ftp->size($file)) {
&status("FTP: file size is $size") if ($verbose_ftp);
my $thisfile = $file || $lfile;
- &DEBUG("lfile => '$lfile'.");
+
if ( -f $thisfile) {
$lsize = -s $thisfile;
if ($_ != $lsize) {
&status("FTP: getting $file.") if ($verbose_ftp);
$ftp->get($file);
}
- &DEBUG("FTP: remsize => '$size'.");
+
if (defined $lsize) {
&DEBUG("FTP: locsize => '$lsize'.");
if ($size != $lsize) {