From 7cb4636b076dfbc9f2f592c660613dd94045b3c8 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 25 Feb 2017 16:09:58 +0800 Subject: [PATCH] =?UTF-8?q?Clear=E6=8C=87=E4=BB=A4=E4=B8=8D=E5=88=A0?= =?UTF-8?q?=E9=99=A4.gitignore=20=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/console/command/Clear.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/console/command/Clear.php b/library/think/console/command/Clear.php index 020febd3..9c3a0e90 100644 --- a/library/think/console/command/Clear.php +++ b/library/think/console/command/Clear.php @@ -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); } }