Sfoglia il codice sorgente

Put rmdir outside of loop

Nathaniel van Diepen 11 anni fa
parent
commit
5820dac2b5
1 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. 5 5
      install/api.php

+ 5 - 5
install/api.php

@@ -141,11 +141,11 @@
 							if($file != '.' && $file != '..'){
 								@unlink(realpath(dirname(__FILE__)).'/'.$file);
 							}
-							if(empty(scandir(realpath(dirname(__FILE__))))){
-								@rmdir(realpath(dirname(__FILE__)));
-							}else{
-								echo "Couldn't remove install directory\n";
-							}
+						}
+						if(empty(scandir(realpath(dirname(__FILE__))))){
+							@rmdir(realpath(dirname(__FILE__)));
+						}else{
+							echo "Couldn't remove install directory\n";
 						}
 					}else{
 						die('Invalid id');