Fixes #14929: Ensure trailing ; on combining files with asset command to fix compiler failures

This commit is contained in:
Hisateru Tanaka
2017-10-07 05:31:37 +09:00
committed by Alexander Makarov
parent 6bde69aa96
commit 6e8cc4c151
2 changed files with 6 additions and 1 deletions

View File

@ -568,8 +568,12 @@ EOD;
{
$content = '';
foreach ($inputFiles as $file) {
$fileContent = rtrim(file_get_contents($file));
if (substr($fileContent, -1) !== ';') {
$fileContent .= ';';
}
$content .= "/*** BEGIN FILE: $file ***/\n"
. file_get_contents($file)
. $fileContent . "\n"
. "/*** END FILE: $file ***/\n";
}
if (!file_put_contents($outputFile, $content)) {