Move die from cleanup to be below test of directory writable.
It's possible this cleanup code is causing serious problems during failures, because it's leaving us no ics files when the export fails. Probably it would be better if we move aside the ics files and restore them later.
This commit is contained in:
parent
05deb600f8
commit
cff22b28ae
1 changed files with 3 additions and 3 deletions
|
@ -562,14 +562,14 @@ $config->{calendarStyle} = 'plain' if not defined $config->{calendarStyle};
|
|||
DieLog("$config->{emacsBinary} doesn't appear to be executable for $config->{emacsBinary}")
|
||||
unless defined $config->{emacsBinary} and -x $config->{emacsBinary};
|
||||
|
||||
DieLog("$CONFIG_FILE doesn't specify a (readable) output directory via outputDir setting: $!")
|
||||
unless defined $config->{outputDir} and -d $config->{outputDir};
|
||||
|
||||
if (defined $config->{cleanOutputDirFirst} and $config->{cleanOutputDirFirst}) {
|
||||
chdir $config->{outputDir} or die "unable to change directory to $config->{outputDir} $? $!";
|
||||
system("/bin/rm -f *.ics");
|
||||
}
|
||||
|
||||
DieLog("$CONFIG_FILE doesn't specify a (readable) output directory via outputDir setting: $!")
|
||||
unless defined $config->{outputDir} and -d $config->{outputDir};
|
||||
|
||||
unless ((defined $config->{publicDiary} and -r $config->{publicDiary}) or
|
||||
(defined $config->{privateyDiary} and -r $config->{privateDiary})) {
|
||||
foreach my $key (qw/publicDiary privateDiary/) {
|
||||
|
|
Loading…
Add table
Reference in a new issue