Skip to content

Commit 1dc61a1

Browse files
committed
fix: VVPPデフォルトエンジンダウンロード後、確実にファイルが閉じられるまで待つ
1 parent b80b70e commit 1dc61a1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/backend/electron/engineAndVvppController.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,13 @@ export class EngineAndVvppController {
230230
progress: (downloadedBytes / totalBytes) * 100,
231231
});
232232
}
233+
234+
// ファイルを確実に閉じる
235+
const { promise, resolve, reject } = Promise.withResolvers();
236+
fileStream.on("close", resolve);
237+
fileStream.on("error", reject);
233238
fileStream.close();
239+
await promise;
234240

235241
downloadedPaths.push(downloadPath);
236242
log.info(`Downloaded ${name} to ${downloadPath}`);

0 commit comments

Comments
 (0)