Content deleted Content added
Updating published sources: General: * Add lots of backslashes to regexes, because new Perl whines about unescaped left-braces. |
Updating published sources: SourceUploader: * Add some debugging and better error handling. |
||
Line 64:
$self->{'loadexisting'}=1;
$self->{'order'}=-1000;
$self->{'fail'}=0;
my $basedir=$AnomieBOT::API::basedir;
$basedir=~s{/$}{};
if(!-d $basedir){
$self->{'fail'}=1;
AnomieBOT::API->warn("Cannot find source directory\n");
return $self;
Line 74 ⟶ 76:
$self->{'summary'}='Updating published sources: ';
if(!open(X, "<:utf8", 'ChangeLog')){
$self->{'fail'}=1;
AnomieBOT::API->warn("Cannot load changelog: $!\n"); return $self;
}
Line 105 ⟶ 108:
while(my $dir=shift @dirs){
if(!opendir(D, $dir)){
$self->{'fail'}=1;
AnomieBOT::API->warn("Cannot open directory $dir: $!\n");
return $self;
Line 124 ⟶ 128:
next if ($stat[2]&(S_IROTH))!=(S_IROTH);
if(!open(X, '<:utf8', $p)){
$self->{'fail'}=1;
AnomieBOT::API->warn("Cannot open file $p: $!\n");
return $self;
Line 280 ⟶ 285:
sub run {
my ($self, $api)=@_;
return undef if $self->{'fail'};
my @keys=keys(%{$self->{'pages'}});
|