Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2019-02-14 02:18:49 +0300
committerDaniel Kesselberg <mail@danielkesselberg.de>2019-02-14 13:48:15 +0300
commit7404c10666e4ec5283b4a5b2d4c2ffc412b7a64b (patch)
tree174f83e3c69607135ced0869ccb1cc7aa9c3bf7f /lib
parenta5bc27c2a6982b4a734dc8ba07bbb2aa2aafb6dc (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.php13
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;
}