mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-14 21:44:57 +00:00
Two windows or processes using one Plug-ins folder could interleave their writes: an install from one could leave its module with the other's grant, a grant written for one plug-in could drop one written for another, and plug-in settings and cache changes could lose each other's keys or pass the cache caps together. Each change to the folder now runs in one turn on disabled.lock, the file the disabled list was already locked with: - plugin.install takes the turn before it reads the stored grants and holds it through the module, grant, put-back and disabled-list writes; plugin.remove holds it through grant removal and storage deletion. - Grant writes, the disabled list, loading the folder, and the plug-ins' settings and cache changes read and write in a turn. - When disabled.lock can't be locked, plugin.install and plugin.remove fail and change nothing, plugin.setEnabled keeps its change in the process, and loading the folder writes nothing to it. Docs: docs/plugins.md, docs/mcp.md, the plugin.install and plugin.remove params text, docs/target-app-parity.md.