mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-08-06 22:10:14 -03:00
switch_channel has three destructive code paths (git reset + clean, git init + checkout --force, and rmtree + ZIP replace) that were missing the _stage_preserved_items / _restore_preserved_items safety net already applied to perform_update. Wrap the channel-specific logic in a try/finally so preserved user data (settings.json, civitai/, cache/, etc.) is physically moved outside plugin_root before any git operation and always restored.
36 KiB
36 KiB