From 1c2dc41174e8225af9cc82f7fa061b536fff26e3 Mon Sep 17 00:00:00 2001 From: Andrei Alecu Date: Thu, 26 Sep 2024 14:13:04 +0300 Subject: [PATCH] fix: images not written properly --- src/images.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/images.ts b/src/images.ts index 0150f5b..4108065 100644 --- a/src/images.ts +++ b/src/images.ts @@ -201,7 +201,7 @@ function writeImageIfNew(path: string, buffer: Buffer) { verbose("Adding image " + path); fs.mkdirsSync(Path.dirname(path)); } - fs.createWriteStream(path).write(buffer); // async but we're not waiting + fs.writeFileSync(path, buffer); } export function parseImageBlock(image: any): ImageSet {