浏览代码

Correct the function that updates the lua scripts make sure it correctly updates scripts except for database_handle.lua.

Mark Crane 12 年之前
父节点
当前提交
f1150a1b5b
共有 1 个文件被更改,包括 11 次插入9 次删除
  1. 11 9
      resources/classes/install.php

+ 11 - 9
resources/classes/install.php

@@ -60,24 +60,25 @@ include "root.php";
 								//set the exception default
 									$exception = false;
 								//set the exceptions
-									if ($file == "database_handle.lua") {
-										$exception = true;
-									}
+									if ($file == "database_handle.lua") { $exception = true; }
 								//check for exceptions
 									if ($exception) {
-										//write over files
-										copy($src.'/'.$file, $dst.'/'.$file);
-									}
-									else {
-										//copy files that don't exist into the destination directory
+										//file does not exist, save a copy in the destination directory
 										if (!file_exists($dst.'/'.$file)) {
+											echo "68: ". $dst.'/'.$file."<br />\n";
 											copy($src.'/'.$file, $dst.'/'.$file);
 										}
 									}
+									else {
+										//write over the file
+										echo "74: ". $dst.'/'.$file."<br />\n";
+										copy($src.'/'.$file, $dst.'/'.$file);
+									}
 							}
 							else {
-								//copy files that don't exist into the destination directory
+								//file does not exist, save a copy in the destination directory
 								if (!file_exists($dst.'/'.$file)) {
+									echo "81: ". $dst.'/'.$file."<br />\n";
 									copy($src.'/'.$file, $dst.'/'.$file);
 								}
 							}
@@ -141,6 +142,7 @@ include "root.php";
 			if (is_readable($this->switch_scripts_dir)) {
 				$this->recursive_copy($src_dir, $dst_dir);
 				unset($src_dir, $dst_dir);
+exit;
 			}
 		}