Clear指令不删除.gitignore 文件

This commit is contained in:
thinkphp
2017-02-25 16:09:58 +08:00
parent bcf64f19f4
commit 7cb4636b07

View File

@@ -34,7 +34,7 @@ class Clear extends Command
foreach ($files as $file) {
if ('.' != $file && '..' != $file && is_dir($path . $file)) {
array_map('unlink', glob($path . $file . '/*.*'));
} elseif (is_file($path . $file)) {
} elseif ('.gitignore' != $file && is_file($path . $file)) {
unlink($path . $file);
}
}