Use more precise regex

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
Daniel Kesselberg 2019-02-14 12:00:47 +01:00
parent 7404c10666
commit b14700c936
No known key found for this signature in database
GPG key ID: 36E3664E099D0614
2 changed files with 3 additions and 3 deletions

View file

@ -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.
];
/**

View file

@ -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],
];
}