Correct file names

cnf_read and cnf_wr can only write to a filename (not a path) inside /etc/asterisk
This commit is contained in:
steve-lad 2021-06-12 09:56:59 +02:00
parent f51f839e9c
commit 1182d65971

View file

@ -798,14 +798,14 @@ function Setup_RealTime()
foreach ($backup_ext as $value) {
if (file_exists($dir . '/extconfig' . $value)) {
// Last possibility is normal file extconfig.conf
$ext_conf_file = $dir . 'extconfig' . $value;
$ext_conf_file = 'extconfig' . $value;
$ext_conf = $cnf_read->getConfig($ext_conf_file);
break;
}
}
if (empty($ext_conf_file)) {
// Have not found a file, so will need to create. $ext_conf must be empty
$ext_conf_file = $dir . '/extconfig.conf';
$ext_conf_file = 'extconfig.conf';
}
if (!empty($ext_conf)) {