Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Sympa
Commits
54288030
Unverified
Commit
54288030
authored
Jul 19, 2019
by
IKEDA Soji
Committed by
GitHub
Jul 19, 2019
Browse files
Merge pull request #702 from ikedas/issue-700 by ikedas
stats page generates spurious warnings in stderr (#700)
parents
f4fe08a6
64d31eec
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/Sympa/Tools/File.pm
View file @
54288030
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment