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 { ...@@ -201,18 +201,12 @@ sub get_dir_size {
my $dir = shift; my $dir = shift;
my $size = 0; my $size = 0;
File::Find::find(
if (opendir(DIR, $dir)) { sub {
foreach my $file (sort grep (!/^\./, readdir(DIR))) { $size += -s $File::Find::name if -f $File::Find::name;
if (-d "$dir/$file") { },
$size += get_dir_size("$dir/$file"); $dir
} else { );
my @info = stat "$dir/$file";
$size += $info[7];
}
}
closedir DIR;
}
return $size; 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