From 592e4d08a0d4e275a316fb899115c1c6258744ed Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 5 Feb 2019 19:00:39 +0100 Subject: [PATCH] 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. --- .../files/lib/system/devtools/pip/DevtoolsPip.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.20.1