Config: when no backup could be restored, last resort should always be to go back to factory defaults (in the unlikely event that one of the backups are readable, it should not exit without a config)

This commit is contained in:
Ad Schellevis 2019-08-09 16:17:44 +02:00
parent 680846d65b
commit cfead4c8a8

View File

@ -296,11 +296,10 @@ class Config extends Singleton
$logger->error("failed restoring " . $backup);
}
}
} else {
// in case there are no backups, restore defaults.
$logger->error(gettext('No valid config.xml found, attempting to restore factory config.'));
$this->restoreBackup('/usr/local/etc/config.xml');
}
// in case there are no backups, restore defaults.
$logger->error(gettext('No valid config.xml found, attempting to restore factory config.'));
$this->restoreBackup('/usr/local/etc/config.xml');
}
}