Skip to content

Commit e98ceba

Browse files
committed
making missing file checker more robust
1 parent 7d6cdd3 commit e98ceba

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/CI/MissingFilesChecker.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ public function getMissingFiles(): array
3131
$orphanedFiles = [];
3232

3333
foreach ($this->finder as $file) {
34-
$htmlFile = str_replace(
35-
[$this->buildContext->getSourceDir(), '.rst'],
36-
[$this->buildContext->getOutputDir(), '.html'],
37-
$file->getRealPath()
34+
$htmlFile = sprintf(
35+
'%s/%s.html',
36+
$this->buildContext->getOutputDir(),
37+
$file->getFilenameWithoutExtension()
3838
);
3939

4040
$firstLine = fgets(fopen($file->getRealPath(), 'r'));

0 commit comments

Comments
 (0)