[misc] CompileController: exact match for output.pdf

The previous regex could mistake user provided pdf files, like
 `fake_output.pdf`, as the final output file.
The frontend expects to find a `output.pdf` file on success.
This commit is contained in:
Jakob Ackermann
2020-12-28 13:16:31 +00:00
parent b03812bf06
commit 49b764a308
2 changed files with 42 additions and 5 deletions
+1 -5
View File
@@ -80,11 +80,7 @@ module.exports = CompileController = {
let file
status = 'failure'
for (file of Array.from(outputFiles)) {
if (
file.path != null
? file.path.match(/output\.pdf$/)
: undefined
) {
if (file.path === 'output.pdf') {
status = 'success'
}
}