fix: make profile deletion rollback-safe

This commit is contained in:
Tunglies
2026-08-03 20:00:01 +08:00
parent 903410c12e
commit c5b641e421
14 changed files with 264 additions and 113 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ async fn import_subscription(url: &str, name: Option<&String>) {
return;
}
if let Err(e) = Config::profiles().await.data_arc().save_file().await {
if let Err(e) = profiles::profiles_save_file_safe().await {
logging!(error, Type::Config, "failed to save imported subscription: {}", e);
handle::Handle::notice_message("import_sub_url::error", e.to_string());
return;