diff --git a/src/FileEnumerator.php b/src/FileEnumerator.php index 4ec8223..518c305 100644 --- a/src/FileEnumerator.php +++ b/src/FileEnumerator.php @@ -165,7 +165,7 @@ public function compileFileList(): void foreach ($finder as $foundFile) { $sourceAbsoluteFilepath = $foundFile->getPathname(); - $sourceRelativeFilePath = str_replace($sourcePath, $sourceRelativePath, $sourceAbsoluteFilepath); + $sourceRelativeFilePath = str_replace(rtrim($sourcePath, DIRECTORY_SEPARATOR), rtrim($sourceRelativePath, DIRECTORY_SEPARATOR), $sourceAbsoluteFilepath); $outputRelativeFilepath = str_replace($prefixToRemove, '', $sourceAbsoluteFilepath); // For symlinked packages.