refactor(archive): remove archive on provider switches/updates

- Remove file archiving when switching providers or updating current provider
- Keep archive functionality only for initial migration (one-time operation)
- Retain simple .bak backup for config.json on each save
- Simplify code by removing unnecessary archive operations from daily workflows

This change prevents unlimited archive growth while maintaining data safety through:
1. Initial migration archives for historical data preservation
2. Single .bak file for basic rollback capability
3. All provider configs stored in SSOT (config.json)
This commit is contained in:
Jason
2025-09-05 16:39:12 +08:00
parent ab6be1d510
commit 54003d69e2
3 changed files with 17 additions and 40 deletions

View File

@@ -88,6 +88,7 @@ pub fn archive_file(ts: u64, category: &str, src: &Path) -> Result<Option<PathBu
Ok(Some(dest))
}
/// 清理供应商名称,确保文件名安全
pub fn sanitize_provider_name(name: &str) -> String {
name.chars()