Show
Ignore:
Timestamp:
08/04/08 18:15:21 (6 years ago)
Author:
Mark Harrison <mark@omniti.com>
git-committer:
Mark Harrison <mark@omniti.com> 1217873721 +0000
git-parent:

[79f48c908dfc145b477e10790c7ad1d656e85181]

git-author:
Mark Harrison <mark@omniti.com> 1217873721 +0000
Message:

Applying the newfiles fixes to the oldfiles module also where applicable.

git-svn-id: https://labs.omniti.com/resmon/trunk@145 8c0face9-b7db-6ec6-c4b3-d5f7145c7d55

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lib/Resmon/Module/OLDFILES.pm

    rae22e3b r88b5a7a  
    2929    my $filecount = $arg->{'filecount'} || 0; 
    3030    my $checkmount = $arg->{'checkmount'} || 0; 
     31    $oldcount = 0; 
    3132 
    3233    # Check to make sure the directory is mounted first 
     
    4950 
    5051sub wanted { 
    51     -f $_ && -M $_ > ($minutes / 1440) && $oldcount++; 
     52    my @fstat = stat($_); 
     53    my $lastmodified = time() - $fstat[9]; 
     54    -f $_ && $lastmodified > ($minutes * 60) && $oldcount++; 
    5255} 
    5356