mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
e119d1cb31
- Fix operation order: write live files first, then save config.json for consistency - Implement short-lock pattern: read state quickly, release lock before I/O operations - Add atomic Codex dual-file writes with rollback on failure - Simplify add_provider and update_provider logic with consistent structure - Remove unnecessary duplicate code and improve error handling reliability This ensures data consistency when operations fail and significantly improves concurrency by minimizing lock holding time during file I/O.