Skip to content

Commit

Permalink
Merge pull request nuvoleweb#301 from nuvoleweb/293-is_dir
Browse files Browse the repository at this point in the history
nuvolewebGH-293: NotRegularDirectoryException thrown while scanning for Yaml Patterns Deriver
  • Loading branch information
ademarco authored Aug 31, 2020
2 parents a5f6ef3 + 447ca70 commit cd03369
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Plugin/Deriver/AbstractYamlPatternsDeriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ public static function create(ContainerInterface $container, $base_plugin_id) {
* {@inheritdoc}
*/
public function fileScanDirectory($directory) {
if (!is_dir($directory)) {
return [];
}
$options = ['nomask' => $this->getNoMask()];
$extensions = $this->getFileExtensions();
$extensions = array_map('preg_quote', $extensions);
Expand Down

0 comments on commit cd03369

Please sign in to comment.