diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-02-14 12:00:47 +0100 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2019-02-14 12:11:30 +0100 |
commit | b14700c9360b2589d35b20b00bc5b863d7fb8243 (patch) | |
tree | 7509b445c89ec6c4b84e3267cf530d8e8907c5b6 | |
parent | 7404c10666e4ec5283b4a5b2d4c2ffc412b7a64b (diff) | |
download | nextcloud-server-b14700c9360b2589d35b20b00bc5b863d7fb8243.tar.gz nextcloud-server-b14700c9360b2589d35b20b00bc5b863d7fb8243.zip |
Use more precise regex
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
-rw-r--r-- | lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php | 2 | ||||
-rw-r--r-- | tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php b/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php index ca0464d9d5c..26f4a56d15a 100644 --- a/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php +++ b/lib/private/IntegrityCheck/Iterator/ExcludeFileByNameFilterIterator.php @@ -53,7 +53,7 @@ class ExcludeFileByNameFilterIterator extends \RecursiveFilterIterator { * @var array */ private $excludedFilenamePatterns = [ - '/^\.webapp-nextcloud-.*/', // Gentoo/Funtoo & derivatives use a tool known as webapp-config to manage wep-apps. + '/^\.webapp-nextcloud-(\d+\.){2}(\d+)(-r\d+)?$/', // Gentoo/Funtoo & derivatives use a tool known as webapp-config to manage wep-apps. ]; /** diff --git a/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php b/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php index 335f6e3fd3d..124618eb538 100644 --- a/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php +++ b/tests/lib/IntegrityCheck/Iterator/ExcludeFileByNameFilterIteratorTest.php @@ -34,7 +34,6 @@ class ExcludeFileByNameFilterIteratorTest extends TestCase { ->disableOriginalConstructor() ->setMethods(['current']) ->getMock(); - } public function fileNameProvider(): array { @@ -43,7 +42,8 @@ class ExcludeFileByNameFilterIteratorTest extends TestCase { ['Thumbs.db', false], ['another file', true], ['.directory', false], - ['.webapp-nextcloud-12.0.5', false], + ['.webapp-nextcloud-15.0.2', false], + ['.webapp-nextcloud-14.0.5-r3', false], ['wx.webapp-nextcloud-obee', true], ]; } |