A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
fix(editor): play-realm staging rm absorbs concurrent-instance races
esengine884a4c8c8d4c
diff --git a/desktop/electron/buildPlayRealm.ts b/desktop/electron/buildPlayRealm.tsindex d1b81b2e4..0bc05b304 100644--- a/desktop/electron/buildPlayRealm.ts+++ b/desktop/electron/buildPlayRealm.ts@@ -101,7 +101,9 @@ async function syncDir(src: string, dst: string, stampFile: string): Promise<voiif (!existsSync(src)) return;const sig = await dirSignature(src);if (existsSync(dst) && existsSync(stampFile) && (await readFile(stampFile, 'utf8')) === sig) return;- await rm(dst, { recursive: true, force: true });+ // Retries absorb the transient ENOTEMPTY when another editor instance (or a+ // crashed earlier copy) still has fingers in this disposable staging dir.+ await rm(dst, { recursive: true, force: true, maxRetries: 5, retryDelay: 50 });await cp(src, dst, { recursive: true });await writeFile(stampFile, sig);}