aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers
diff options
context:
space:
mode:
authorpartouf <partouf@gmail.com>2022-09-23 17:45:41 +0200
committerpartouf <partouf@gmail.com>2022-09-23 17:45:41 +0200
commit82deb6037c32c8e23f37a33484ee1df9687de3f1 (patch)
treebc9b2831d8640f0b53cc6bac435b662a66509ad2 /lib/compilers
parent64ce93916a3a51ab922d7b9c585a65f76071eb94 (diff)
downloadcompiler-explorer-82deb6037c32c8e23f37a33484ee1df9687de3f1.tar.gz
compiler-explorer-82deb6037c32c8e23f37a33484ee1df9687de3f1.zip
bugfix z88dk check for .tap filegh-4325
Diffstat (limited to 'lib/compilers')
-rw-r--r--lib/compilers/z88dk.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/compilers/z88dk.ts b/lib/compilers/z88dk.ts
index b40560a35..be2c43734 100644
--- a/lib/compilers/z88dk.ts
+++ b/lib/compilers/z88dk.ts
@@ -149,9 +149,11 @@ export class z88dkCompiler extends BaseCompiler {
if (result.code === 0 && filters.binary) {
const tapeFilepath = path.join(result.dirPath, this.getTapefilename());
- const file_buffer = await fs.readFile(tapeFilepath);
- const binary_base64 = file_buffer.toString('base64');
- result.speccytape = binary_base64;
+ if (await utils.fileExists(this.getTapefilename())) {
+ const file_buffer = await fs.readFile(tapeFilepath);
+ const binary_base64 = file_buffer.toString('base64');
+ result.speccytape = binary_base64;
+ }
}
return result;