Browse Source

Bug fix, allow removal of install directory as well

Nathaniel van Diepen 11 years ago
parent
commit
bf3e072c27
1 changed files with 4 additions and 1 deletions
  1. 4 1
      install/api.php

+ 4 - 1
install/api.php

@@ -138,7 +138,10 @@
 					}elseif($id='cleanup'){
 						$files = scandir(realpath(dirname(__FILE__)));
 						foreach($files as $file){
-							unlink($file);
+							if($file != '.' && $file != '..'){
+								unlink(realpath(dirname(__FILE__)).'/'.$file);
+							}
+							rmdir(realpath(dirname(__FILE__)));
 						}
 					}else{
 						die('Invalid id');