Merge pull request #16492 from nextcloud/enh/exclude-rnd-files
Exclude .rnd files from integrity check
This commit is contained in:
commit
d5b524ae07
|
@ -43,6 +43,7 @@ class ExcludeFileByNameFilterIterator extends \RecursiveFilterIterator {
|
||||||
'Thumbs.db', // Microsoft Windows
|
'Thumbs.db', // Microsoft Windows
|
||||||
'.directory', // Dolphin (KDE)
|
'.directory', // Dolphin (KDE)
|
||||||
'.webapp', // Gentoo/Funtoo & derivatives use a tool known as webapp-config to manage web-apps.
|
'.webapp', // Gentoo/Funtoo & derivatives use a tool known as webapp-config to manage web-apps.
|
||||||
|
'.rnd',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -68,12 +69,12 @@ class ExcludeFileByNameFilterIterator extends \RecursiveFilterIterator {
|
||||||
}
|
}
|
||||||
|
|
||||||
$currentFileName = $current->getFilename();
|
$currentFileName = $current->getFilename();
|
||||||
if (in_array($currentFileName, $this->excludedFilenames, true)){
|
if (in_array($currentFileName, $this->excludedFilenames, true)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->excludedFilenamePatterns as $pattern){
|
foreach ($this->excludedFilenamePatterns as $pattern) {
|
||||||
if (preg_match($pattern, $currentFileName) > 0){
|
if (preg_match($pattern, $currentFileName) > 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,7 @@ class ExcludeFileByNameFilterIteratorTest extends TestCase {
|
||||||
['.webapp-nextcloud-15.0.2', false],
|
['.webapp-nextcloud-15.0.2', false],
|
||||||
['.webapp-nextcloud-14.0.5-r3', false],
|
['.webapp-nextcloud-14.0.5-r3', false],
|
||||||
['wx.webapp-nextcloud-obee', true],
|
['wx.webapp-nextcloud-obee', true],
|
||||||
|
['.rnd', false],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue