Skip to content

Commit 10ef767

Browse files
committed
Skip directory before checking files
1 parent 97ae764 commit 10ef767

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/Pipeline/FileEnumerator.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,13 @@ protected function addFile(
8686
?string $autoloaderType = null
8787
): void {
8888

89+
if ($this->filesystem->directoryExists($sourceAbsoluteFilepath)) {
90+
$this->logger->debug("Skipping directory at {sourcePath}", ['sourcePath' => $sourceAbsoluteFilepath]);
91+
return;
92+
}
93+
8994
// Do not add a file if its source does not exist!
90-
if (!$this->filesystem->fileExists($sourceAbsoluteFilepath)
91-
) {
92-
// && !$this->filesystem->directoryExists($sourceAbsoluteFilepath)) {
95+
if (!$this->filesystem->fileExists($sourceAbsoluteFilepath)) {
9396
$this->logger->warning("File does not exist: {sourcePath}", ['sourcePath' => $sourceAbsoluteFilepath]);
9497
return;
9598
}

0 commit comments

Comments
 (0)