Skip to content

Commit

Permalink
more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
VVelox committed Jul 14, 2024
1 parent 2d95f95 commit acc16c7
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions snmp/poudriere
Original file line number Diff line number Diff line change
Expand Up @@ -317,17 +317,19 @@ if ( $? == 0 ) {
if ( defined( $found->{$item} ) ) {
$found->{$item} = abs_path( $found->{$item} );
if ( defined( $found->{$item} ) ) {
my @files = read_dir( $found->{$item} );
foreach my $to_stat (@files) {
if ( -f $found->{$item} . '/' . $to_stat ) {
my (
$dev, $ino, $mode, $nlink, $uid, $gid, $rdev,
$size, $atime, $mtime, $ctime, $blksize, $blocks
) = stat( $found->{$item} . '/' . $to_stat );
$found->{ $dir_size_stats{$item} } += $size;
if ( -d $found->{$item} ) {
my @files = read_dir( $found->{$item} );
foreach my $to_stat (@files) {
if ( -f $found->{$item} . '/' . $to_stat ) {
my (
$dev, $ino, $mode, $nlink, $uid, $gid, $rdev,
$size, $atime, $mtime, $ctime, $blksize, $blocks
) = stat( $found->{$item} . '/' . $to_stat );
$found->{ $dir_size_stats{$item} } += $size;
}
}
}
$data->{stats}{ $dir_size_stats{$item} } = $found->{ $dir_size_stats{$item} };
$data->{stats}{ $dir_size_stats{$item} } = $found->{ $dir_size_stats{$item} };
} ## end if ( -d $found->{$item} )
} ## end if ( defined( $found->{$item} ) )
} ## end if ( defined( $found->{$item} ) )
};
Expand Down

0 comments on commit acc16c7

Please sign in to comment.