do not traverse into invoice template subdirectories (#3735)

This commit is contained in:
Kevin Papst
2023-01-05 15:51:21 +01:00
committed by GitHub
parent 95e06746bd
commit 30bc3653d7

View File

@@ -161,7 +161,7 @@ final class InvoiceDocumentRepository
continue;
}
$finder = Finder::create()->ignoreDotFiles(true)->files()->in($searchDir)->name('*.*');
$finder = Finder::create()->ignoreDotFiles(true)->files()->in($searchDir)->depth(0)->name('*.*');
foreach ($finder->getIterator() as $file) {
$doc = new InvoiceDocument($file);
// the first found invoice document wins