diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-02-14 02:18:49 +0300 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-02-14 13:48:15 +0300 |
commit | 7404c10666e4ec5283b4a5b2d4c2ffc412b7a64b (patch) | |
tree | 174f83e3c69607135ced0869ccb1cc7aa9c3bf7f /lib | |
parent | a5bc27c2a6982b4a734dc8ba07bbb2aa2aafb6dc (diff) |
Apply code style fixes from owncloud, revert regex
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php b/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php index c6017a0b243..ca0464d9d5c 100644 --- a/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php +++ b/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php @@ -52,24 +52,27 @@ class ExcludeFileByNameFilterIterator extends \RecursiveFilterIterator { * * @var array */ - private $excludedFileNamePatterns = [ - '/\.webapp-nextcloud-(\d+\.){3}(-r\d+)?/', // Gentoo/Funtoo & derivatives use a tool known as webapp-config to manage wep-apps. + private $excludedFilenamePatterns = [ + '/^\.webapp-nextcloud-.*/', // Gentoo/Funtoo & derivatives use a tool known as webapp-config to manage wep-apps. ]; /** * @return bool */ public function accept() { - if($this->isDir()) { + /** @var \SplFileInfo $current */ + $current = $this->current(); + + if ($current->isDir()) { return true; } - $currentFileName = $this->current()->getFilename(); + $currentFileName = $current->getFilename(); if (in_array($currentFileName, $this->excludedFilenames, true)){ return false; } - foreach ($this->excludedFileNamePatterns as $pattern){ + foreach ($this->excludedFilenamePatterns as $pattern){ if (preg_match($pattern, $currentFileName) > 0){ return false; } |