Unverified Commit 54288030 authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #702 from ikedas/issue-700 by ikedas

stats page generates spurious warnings in stderr (#700)
parents f4fe08a6 64d31eec
......@@ -201,18 +201,12 @@ sub get_dir_size {
my $dir = shift;
my $size = 0;
if (opendir(DIR, $dir)) {
foreach my $file (sort grep (!/^\./, readdir(DIR))) {
if (-d "$dir/$file") {
$size += get_dir_size("$dir/$file");
} else {
my @info = stat "$dir/$file";
$size += $info[7];
}
}
closedir DIR;
}
File::Find::find(
sub {
$size += -s $File::Find::name if -f $File::Find::name;
},
$dir
);
return $size;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment