From: Matthias Schmidt Date: Tue, 5 Feb 2019 18:00:39 +0000 (+0100) Subject: Do not ignore `.gitignore` and `.htaccess` files in DevtoolsPip X-Git-Tag: 3.1.8~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=592e4d08a0d4e275a316fb899115c1c6258744ed;p=GitHub%2FWoltLab%2FWCF.git Do not ignore `.gitignore` and `.htaccess` files in DevtoolsPip When syncing files, ignoring these files can cause directories not be created even though the code expects them to exist. --- diff --git a/wcfsetup/install/files/lib/system/devtools/pip/DevtoolsPip.class.php b/wcfsetup/install/files/lib/system/devtools/pip/DevtoolsPip.class.php index 3b72a871ab..b9b7be4322 100644 --- a/wcfsetup/install/files/lib/system/devtools/pip/DevtoolsPip.class.php +++ b/wcfsetup/install/files/lib/system/devtools/pip/DevtoolsPip.class.php @@ -206,7 +206,7 @@ class DevtoolsPip extends DatabaseObjectDecorator { $filter = new \RecursiveCallbackFilterIterator($directory, function ($current) { /** @var \SplFileInfo $current */ $filename = $current->getFilename(); - if ($filename[0] === '.') { + if ($filename[0] === '.' && $filename !== '.gitignore' && $filename !== '.htaccess') { // ignore dot files and files/directories starting with a dot return false; } @@ -298,7 +298,7 @@ class DevtoolsPip extends DatabaseObjectDecorator { $filter = new \RecursiveCallbackFilterIterator($directory, function ($current) { /** @var \SplFileInfo $current */ $filename = $current->getFilename(); - if ($filename[0] === '.') { + if ($filename[0] === '.' && $filename !== '.gitignore' && $filename !== '.htaccess') { // ignore dot files and files/directories starting with a dot return false; }