add caveat when the config.lua is inside scripts\resources
due to app_defaults running before install_switch create_config_lua cannot create it's config if the detected folder is scripts\resources\ this solves this by adding a caveat to create it's parent folder when it is called resources
This commit is contained in:
parent
9bc96195c1
commit
f3f24c4085
|
|
@ -278,6 +278,14 @@ include "root.php";
|
||||||
|
|
||||||
public function create_config_lua() {
|
public function create_config_lua() {
|
||||||
$this->write_progress("\tCreating " . $this->config_lua);
|
$this->write_progress("\tCreating " . $this->config_lua);
|
||||||
|
$dirs = array_pop(explode("/", normalize_path($config_path)));
|
||||||
|
$path = normalize_path_to_os(join("/", $dirs));
|
||||||
|
if($dirs[(sizeof($dirs)-1)] == 'resources' and !file_exists($path)){
|
||||||
|
if (!mkdir($path, 0755, true)) {
|
||||||
|
throw new Exception("Failed to create the missing resources directory '$path'");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
global $db;
|
global $db;
|
||||||
//get the odbc information
|
//get the odbc information
|
||||||
$sql = "select count(*) as num_rows from v_databases ";
|
$sql = "select count(*) as num_rows from v_databases ";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue