launcher
launcher copied to clipboard
[BUG] Curation import / delete fails if a file is locked causing Flashpoint to fully freeze [breaking]
Describe the bug The curation importer / deletion can "crash" the launcher if it tries to delete curation files that are already in use (locked). It could be that an external program has locked it, or that there is a rare race condition that makes the launcher lock it.
To Reproduce Steps to reproduce the behavior:
- Download the example attached curation
Working.zip and unpack into
Curations\Working
in Flashpoint Directory - Navigate to the curation directory
Curations\Working\c3c6bd3b-cdd8-44c5-9c07-2460c7dbab17
and open cmd / powershell terminal byshift
+right-click
in the folder. - in the new terminal window, accquire a lock on meta.yaml:
pause 5>meta.yaml
- Start Flashpoint.exe
- Go to Curate tab, click on the curation
No Title
with the same ID asc3c6bd3b-cdd8-44c5-9c07-2460c7dbab17
- Click on
Delete
-button - See blank screen. Error is thrown in devtools. Attached below for reference
Expected behavior A error message to be shown to user that a file or folder is already in use by something else and they can't do that action. Not that the program freezes and locks up
webpack-internal:///378:209 Error: EBUSY: resource busy or locked, unlink 'E:\flashpoint\Flashpoint 10 Infinity_laucher_10-1\Curations\Working\c3c6bd3b-cdd8-44c5-9c07-2460c7dbab17\meta.yaml'
at Object.unlinkSync (fs.js:1140)
at rimrafSync (webpack-internal:///424:254)
at eval (webpack-internal:///424:291)
at Array.forEach (<anonymous>)
at rmkidsSync (webpack-internal:///424:291)
at rmdirSync (webpack-internal:///424:281)
at Object.rimrafSync [as removeSync] (webpack-internal:///424:252)
at eval (webpack-internal:///314:85)
at Ii (webpack-internal:///378:211)
at Vj (webpack-internal:///378:257)
https://trello.com/c/RiEuzilE/170-curation-importer-fails-if-a-file-is-already-in-use
I believe this is a duplicate of #170