diff --git a/app/scripts/app_defaults.php b/app/scripts/app_defaults.php index 31b4452610..2cb75df991 100644 --- a/app/scripts/app_defaults.php +++ b/app/scripts/app_defaults.php @@ -26,11 +26,9 @@ //process this only one time if ($domains_processed == 1) { - if (isset($_SESSION['switch']['scripts']['dir'])) { - $obj = new scripts; - $obj->copy_files(); - $obj->write_config(); - } + $obj = new scripts; + $obj->copy_files(); + $obj->write_config(); } ?> \ No newline at end of file diff --git a/app/scripts/resources/classes/scripts.php b/app/scripts/resources/classes/scripts.php index f9df3b19ac..ecf29e3da8 100644 --- a/app/scripts/resources/classes/scripts.php +++ b/app/scripts/resources/classes/scripts.php @@ -99,7 +99,7 @@ class scripts { * Writes the config.lua */ public function write_config() { - if (strlen($_SESSION['switch']['scripts']['dir']) > 0) { + if (is_dir($_SESSION['switch']['scripts']['dir'])) { //define the global variables global $db;