mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-11 16:30:57 +00:00
Fixes #11009 ## Summary On Windows, Chromium may still hold file handles on the user-data directory when global teardown runs `restorePath`. The `fs.moveSync(..., { overwrite: true })` call fails with EPERM because it can't remove the target while handles are held. ## Changes - Split `restorePath` into explicit remove-then-move - Added `removeWithRetry` that retries up to 3× on EPERM/EBUSY with 500ms delay between attempts - Downgraded the catch from `console.error` (which looks like a test failure) to `console.warn` so teardown noise doesn't mask real failures No E2E regression test added: this is a test-infrastructure fix for a Windows-specific race condition in teardown that cannot be reliably reproduced in CI. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-11013-fix-handle-EPERM-EBUSY-in-global-teardown-restorePath-33e6d73d3650815ebe0cd42af23e6c0e) by [Unito](https://www.unito.io)