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
64d31eec
Commit
64d31eec
authored
Jul 19, 2019
by
IKEDA Soji
Browse files
stats page generates spurious warnings in stderr.
parent
313a004e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/Sympa/Tools/File.pm
View file @
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
;
}
...
...
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