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
344db14d
Commit
344db14d
authored
May 25, 2020
by
IKEDA Soji
Browse files
tidyall
parent
8ac7be91
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/cgi/wwsympa.fcgi.in
View file @
344db14d
...
...
@@ -8361,14 +8361,18 @@ sub do_editfile {
$file, subdir => $subdir);
}
$param->{'filecontent'} = Sympa::Tools::Text::slurp($param->{'filepath'});
$param->{'filecontent'} =
Sympa::Tools::Text::slurp($param->{'filepath'});
unless (defined $param->{'filecontent'}) {
wwslog('err', 'Failed to open file %s: %m', $param->{'filepath'});
Sympa::WWW::Report::reject_report_web(
'intern', 'cannot_open_file',
{'file' => $param->{'file_path'}}, $param->{'action'},
$list, $param->{'user'}{'email'},
'intern',
'cannot_open_file',
{'file' => $param->{'file_path'}},
$param->{'action'},
$list,
$param->{'user'}{'email'},
$robot
);
web_db_log(
...
...
src/lib/Sympa/Archive.pm
View file @
344db14d
...
...
@@ -151,9 +151,9 @@ sub select_archive {
my
$dh
;
unless
(
opendir
$dh
,
$directory
)
{
if
(
-
d
$directory
)
{
if
(
-
d
$directory
)
{
$log
->
syslog
('
err
',
'
Failed to open archive directory %s: %s
',
$directory
,
$ERRNO
);
$directory
,
$ERRNO
);
}
return
;
}
...
...
@@ -221,7 +221,7 @@ sub html_fetch {
unless
(
$handle
)
{
if
(
-
f
$html_file
)
{
$log
->
syslog
('
err
',
'
Failed to open archive file %s: %s
',
$html_file
,
$ERRNO
);
$html_file
,
$ERRNO
);
}
return
undef
;
}
...
...
@@ -316,8 +316,11 @@ sub html_next {
unless
(
$self
->
{
_html_metadatas
})
{
my
$dh
;
unless
(
opendir
$dh
,
$self
->
{
arc_directory
})
{
$log
->
syslog
('
err
',
'
Cannot open dir %s: %s
',
$self
->
{
arc_directory
},
$ERRNO
);
$log
->
syslog
(
'
err
',
'
Cannot open dir %s: %s
',
$self
->
{
arc_directory
},
$ERRNO
);
return
undef
;
}
$self
->
{
_html_metadatas
}
=
[
...
...
src/sbin/sympa.pl.in
View file @
344db14d
...
...
@@ -782,7 +782,7 @@ if ($main::options{'dump'} or $main::options{'dump_users'}) {
}
if
(
$err
>=
0
)
{
print
STDERR
"
@{
$
result
{'
errors
'
}
}
";
exit
1
;
exit
1
;
}
exit
0
;
...
...
support/git-set-file-times
View file @
344db14d
...
...
@@ -23,17 +23,19 @@ while (<FH>) {
close
FH
;
$/
=
"
\n
";
open
FH
,
"
git log -m -r --name-only --no-color --pretty=raw -z
@ARGV
|
"
or
die
$!
;
open
FH
,
"
git log -m -r --name-only --no-color --pretty=raw -z
@ARGV
|
"
or
die
$!
;
while
(
<
FH
>
)
{
chomp
;
if
(
/^committer .*? (\d+) (?:[\-\+]\d+)$/
)
{
$commit_time
=
$
1
;
}
elsif
(
s/\0\0commit [a-f0-9]{40}( \(from [a-f0-9]{40}\))?$//
or
s/\0$//
)
{
my
@files
=
delete
@ls
{
split
(
/\0/
,
$_
)};
@files
=
grep
{
defined
$_
}
@files
;
next
unless
@files
;
map
{
s/^/$prefix/
}
@files
;
utime
$commit_time
,
$commit_time
,
@files
;
$commit_time
=
$
1
;
}
elsif
(
s/\0\0commit [a-f0-9]{40}( \(from [a-f0-9]{40}\))?$//
or
s/\0$//
)
{
my
@files
=
delete
@ls
{
split
(
/\0/
,
$_
)};
@files
=
grep
{
defined
$_
}
@files
;
next
unless
@files
;
map
{
s/^/$prefix/
}
@files
;
utime
$commit_time
,
$commit_time
,
@files
;
}
last
unless
%ls
;
}
...
...
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