Adding file_exists check in install/index.php
这个提交包含在:
父节点
a61bf66fe3
当前提交
4f9249754b
共有 1 个文件被更改,包括 14 次插入 和 6 次删除
|
|
@ -8,13 +8,21 @@ $db_file_path = $db_config_path."database.php";
|
|||
function delDir($dir) {
|
||||
$files = glob( $dir . '*', GLOB_MARK );
|
||||
foreach ( $files as $file ) {
|
||||
if( substr( $file, -1 ) == '/' )
|
||||
if ( substr( $file, -1 ) == '/' ) {
|
||||
if (file_exists($file)) {
|
||||
delDir( $file );
|
||||
else
|
||||
}
|
||||
} else {
|
||||
if (file_exists($file)) {
|
||||
unlink( $file );
|
||||
}
|
||||
}
|
||||
}
|
||||
// This step may be not needed
|
||||
if (file_exists($dir)) {
|
||||
rmdir( $dir );
|
||||
}
|
||||
}
|
||||
|
||||
if (file_exists($db_file_path)) {
|
||||
delDir(getcwd());
|
||||
|
|
|
|||
正在加载…
在新工单中引用