Commit 344db14d authored by IKEDA Soji's avatar IKEDA Soji
Browse files

tidyall

parent 8ac7be91
......@@ -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(
......
......@@ -151,7 +151,7 @@ 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);
}
......@@ -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} = [
......
......@@ -23,16 +23,18 @@ 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$//) {
} 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;
map {s/^/$prefix/} @files;
utime $commit_time, $commit_time, @files;
}
last unless %ls;
......
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